Extends
Members
currentStatus
Returns the current state of the playback device
duration
Retrieves the total duration of the file, unit is millisecond.
fileName
Retrieves the name of the playback file
first
Get the first sensor
- Overrides:
- Source:
isRealTime
Indicates if playback is in real time mode or non real time
In real time mode, playback will play the same way the file was recorded. If the application
takes too long to handle the callback, frames may be dropped.
In non real time mode, playback will wait for each callback to finish handling the data before
reading the next frame. In this mode no frames will be dropped, and the application controls
the frame rate of the playback (according to the callback handler duration).
isRealTime
Set the playback to work in real time or non real time
isValid
Check if everything is OK, e.g. if the device object is connected to underlying hardware
- Overrides:
- Source:
position
Retrieves the current position of the playback in the file in terms of time. Unit is
millisecond
Methods
(static) from(device) → {PlaybackDevice|undefined}
Create a PlaybackDevice from another device
Parameters:
| Name | Type | Description |
|---|---|---|
device |
Device | another existing device that can be converted to a PlaybackDevice |
Returns:
If the the input device can be
converted to a PlaybackDevice, return the newly created PlaybackDevice,
otherwise, undefined is returned.
- Type
- PlaybackDevice | undefined
destroy()
Release resources associated with the object
- Overrides:
- Source:
getCameraInfo(infoopt) → {CameraInfoObject|String|undefined}
Get camera information
There are 2 acceptable forms of syntax:
Syntax 1. getCameraInfo()
Syntax 2. getCameraInfo(info)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
info |
String | Integer |
<optional> |
the camera_info type, see camera_info for available values |
- Overrides:
- Source:
Returns:
if no argument is provided, {CameraInfoObject} is
returned. If a camera_info is provided, the specific camera info value string is returned.
- Type
- CameraInfoObject | String | undefined
pause() → {undefined}
Pauses the playback
Calling pause() in "paused" status does nothing
If pause() is called while playback status is "playing" or "stopped", the playback will not
play until resume() is called
Returns:
- Type
- undefined
querySensors() → {Array.<Sensor>}
get an array of adjacent sensors, sharing the same physical parent composite device
- Overrides:
- Source:
Returns:
- Type
- Array.<Sensor>
reset() → {undefined}
Send hardware reset request to the device.
- Overrides:
- Source:
Returns:
- Type
- undefined
resume() → {undefined}
Resumes the playback
Calling resume() while playback status is "playing" or "stopped" does nothing
Returns:
- Type
- undefined
seek(time) → {undefined}
Sets the playback to a specified time point of the played data
Parameters:
| Name | Type | Description |
|---|---|---|
time |
time | the target time to seek to, unit is millisecond |
Returns:
- Type
- undefined
setPlaybackSpeed(speed)
Set the playing speed
Parameters:
| Name | Type | Description |
|---|---|---|
speed |
Float | indicates a multiplication of the speed to play (e.g: 1 = normal, 0.5 half normal speed) |
setStatusChangedCallback(callback) → {undefined}
Register a callback to receive the playback device's status changes
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
StatusChangedCallback | the callback method |
Returns:
- Type
- undefined
stop() → {undefined}
Stops playback
Returns:
- Type
- undefined
supportsCameraInfo(info) → {Boolean|undefined}
Check if specific camera info is supported.
Parameters:
| Name | Type | Description |
|---|---|---|
info |
String | Integer | info type to query. See camera_info for available values |
- Overrides:
- Source:
- See:
-
- enum camera_info
Returns:
Returns undefined if an invalid info type was specified.
- Type
- Boolean | undefined
Example
Example of 3 equivalent calls of the same query
device.supportsCameraInfo('name');
device.supportsCameraInfo(realsense2.camera_info.camera_info_name);
device.supportsCameraInfo(realsense2.camera_info.CAMERA_INFO_NAME);