ManagerVideos

You can access this manager through the Homey instance as this.homey.videos

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

Promise.<VideoDASH>

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

Promise.<VideoHLS>

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

Promise.<VideoOther>

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

Promise.<VideoRTMP>

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

Promise.<VideoRTSP>

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

Promise.<VideoWebRTC>

getVideo

getVideo(id): VideoWebRTC|VideoRTSP|VideoHLS|VideoDASH|VideoRTMP|VideoOther

Get 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

Returns

Promise.<void>