VideoHLS

The VideoHLS class represents a video stream that can be viewed through Homey using HLS.

Constructor

VideoHLS

new VideoHLS()

Example

Creating an HLS camera stream

// In your device.js file
async onInit() {
  const video = await this.homey.videos.createVideoHLS();

  video.registerVideoUrlListener(async () => {
    return { url: `http://${this.getSetting('ip')}/stream.m3u8` };
  });

  await this.setCameraVideo('front_door', 'Front Door', video);
}

Extends

Instance Methods

registerVideoUrlListener

registerVideoUrlListener(listener): VideoWithURL

Register a listener for video URL requests. This is invoked when Homey requests the video stream URL.

Parameters

Name Type Description
listener
function

Function that returns the video stream URL object (eg. { url: 'rtsp://...' }).

Returns

unregister

(async) unregister()

Unregister the video. This is a shorthand method for ManagerVideos#unregisterVideo.