Instance Methods
createVideoDASH
(async) createVideoDASH(optionsopt): Promise.<VideoDASH>Creates an DASH video instance for video streaming. The video must be associated with a device using Device#setCameraVideo to enable streaming functionality.
Parameters
Name | Type | Description |
---|---|---|
options
|
object
<optional> default: {}
|
Stream-specific options |
allowInvalidCertificates
|
boolean
<optional> default: false
|
Whether the frontend should accept invalid certificates |
demuxer
|
string
<optional> |
The demuxer to use for the stream. If null, the default demuxer will be used. This is only used for raw streams. Can be one of 'h264', 'h265', 'mpegts' or 'ts' |
|
Returns
A configured DASH video instance
createVideoHLS
(async) createVideoHLS(optionsopt): Promise.<VideoHLS>Creates an HLS video instance for video streaming. The video must be associated with a device using Device#setCameraVideo to enable streaming functionality.
Parameters
Name | Type | Description |
---|---|---|
options
|
object
<optional> default: {}
|
Stream-specific options |
allowInvalidCertificates
|
boolean
<optional> default: false
|
Whether the frontend should accept invalid certificates |
demuxer
|
string
<optional> |
The demuxer to use for the stream. If null, the default demuxer will be used. This is only used for raw streams. Can be one of 'h264', 'h265', 'mpegts' or 'ts' |
|
Returns
A configured HLS video instance
createVideoOther
(async) createVideoOther(optionsopt): Promise.<VideoOther>Creates an 'other' video instance for video streaming. This video can contain any VLC-supported URL, and the front-end will try to play it. The video must be associated with a device using Device#setCameraVideo to enable streaming functionality.
Parameters
Name | Type | Description |
---|---|---|
options
|
object
<optional> default: {}
|
Stream-specific options |
allowInvalidCertificates
|
boolean
<optional> default: false
|
Whether the frontend should accept invalid certificates |
demuxer
|
string
<optional> |
The demuxer to use for the stream. If null, the default demuxer will be used. This is only used for raw streams. Can be one of 'h264', 'h265', 'mpegts' or 'ts' |
|
Returns
A configured 'other' video instance
createVideoRTMP
(async) createVideoRTMP(optionsopt): Promise.<VideoRTMP>Creates an RTMP video instance for video streaming. The video must be associated with a device using Device#setCameraVideo to enable streaming functionality.
Parameters
Name | Type | Description |
---|---|---|
options
|
object
<optional> default: {}
|
Stream-specific options |
allowInvalidCertificates
|
boolean
<optional> default: false
|
Whether the frontend should accept invalid certificates |
demuxer
|
string
<optional> |
The demuxer to use for the stream. If null, the default demuxer will be used. This is only used for raw streams. Can be one of 'h264', 'h265', 'mpegts' or 'ts' |
|
Returns
A configured RTMP video instance
createVideoRTSP
(async) createVideoRTSP(optionsopt): Promise.<VideoRTSP>Creates an RTSP video instance for video streaming. The video must be associated with a device using Device#setCameraVideo to enable streaming functionality.
Parameters
Name | Type | Description |
---|---|---|
options
|
object
<optional> default: {}
|
Stream-specific options |
allowInvalidCertificates
|
boolean
<optional> default: false
|
Whether the frontend should accept invalid certificates |
demuxer
|
string
<optional> |
The demuxer to use for the stream. If null, the default demuxer will be used. This is only used for raw streams. Can be one of 'h264', 'h265', 'mpegts' or 'ts' |
|
Returns
A configured RTSP video instance
createVideoWebRTC
(async) createVideoWebRTC(optionsopt): Promise.<VideoWebRTC>Creates a WebRTC video instance for video streaming. The video must be associated with a device using Device#setCameraVideo to enable streaming functionality.
Parameters
Name | Type | Description |
---|---|---|
options
|
object
<optional> default: {}
|
Stream-specific options |
dataChannel
|
boolean
<optional> default: true
|
Whether the frontend should setup a WebRTC data channel for bidirectional communication. Some video streams don't work with a data channel and some don't work without it. |
|
Returns
A configured WebRTC video stream instance
getVideo
getVideo(id): VideoWebRTC|VideoRTSP|VideoHLS|VideoDASH|VideoRTMP|VideoOtherGet a registered Video.
Parameters
Name | Type | Description |
---|---|---|
id
|
string |
Returns
unregisterVideo
(async) unregisterVideo(videoInstance): Promise.<void>Unregister a Video.
Parameters
Name | Type | Description |
---|---|---|
videoInstance
|
Video |