Steps for video recording.
- Source:
Properties:
Name | Type | Description |
---|---|---|
video |
VideoRecorder | Video recorder instance. |
Methods
-
<protected> _makeVideoPath( [opts])
-
Helper to make video path.
Parameters:
Name Type Argument Description opts
object <optional>
Step options.
Properties
Name Type Argument Description name
string <optional>
File name. Extension
.avi
will be added automatically. Default name will be generated withuuid
algorithm.dir
string <optional>
Folder to save video.
Returns:
Full video path.
- Type
- string
-
<async, protected> _videoLocation()
-
Helper to get video location.
Returns:
Dict of location.
- Type
- Promise.<object>
-
getVideo( [opts])
-
Step to get path to recorded video.
Parameters:
Name Type Argument Description opts
object <optional>
Step options.
Properties
Name Type Argument Default Description check
boolean <optional>
true Flag to check that video is recorded and path exists.
Returns:
Path to recorded video.
- Type
- string
-
removeVideo( [opts])
-
Step to remove recorded video.
Parameters:
Name Type Argument Description opts
object <optional>
Step options.
Properties
Name Type Argument Default Description check
boolean <optional>
true Flag to check step result.
Throws:
-
If video file wasn't removed.
- Type
- AssertionError
Returns:
true
if step was executed,false
if was skipped.- Type
- boolean
-
-
<async> startVideo( [opts])
-
Step to start video recording. Step recall will be skipped if video recording wasn't stopped before.
Parameters:
Name Type Argument Description opts
object <optional>
Step options.
Properties
Name Type Argument Default Description name
string <optional>
File name. Extension
.avi
will be added automatically. Default name will be generated withuuid
algorithm.dir
string <optional>
Folder to save video.
check
boolean <optional>
true Flag to check that video recording was launched.
Throws:
-
If video recording wasn't launched.
- Type
- AssertionError
Returns:
true
if step was executed,false
if was skipped.- Type
- Promise.<boolean>
-
-
<async> stopVideo( [opts])
-
Step to stop video recording. Step call will be skipped if video recording wasn't launched before.
Parameters:
Name Type Argument Description opts
object <optional>
Step options.
Properties
Name Type Argument Default Description check
boolean <optional>
true Flag to check that video recording was stopped.
Throws:
-
If video recording wasn't stopped.
- Type
- AssertionError
Returns:
-
Path to recorded video.
- Type
- Promise.<string>
-
false
if step was skipped.- Type
- Promise.<boolean>
-