Low Latency Streaming

Does Lightning support low latency streaming protocols like WebRTC, SRT, RTSP?

Short answer: You need to implement it yourself.

Long answer: Lightning’s video player is a regular HTML5 video that gets rendered on the canvas, for what I’ve seen.

Unfortunately it doesn’t support anything additional to the video element out of the box.

In the project I’m currently working on we had to implement HLS ourselves. What the VideoPlayer plug-in does offer, however, are a load() and unloaded() methods which allow you to correctly initialize and clean such implementation.

From there we were able to render over the video the player controls, additional text and so on.

@eduardo.guzman I am new to all this and am looking for a quick guide/steps/pointers that can help me implement HLS or WebRTC in my project.

Unfortunately, I’m unable to provide such guide. However, based on personal experience I can say that you’d need to mix these two approaches:

  1. Implement hls.js on your project following the start guide: hls.js/API.md at master · video-dev/hls.js · GitHub
  2. Use Lightning’s VideoPlayer plugin. You’ll have to use the load() and unload() functions that the VideoPlayer plugin offers to actually load hls.js (what’s done on 1) LightningJS.io - Documentation

Thank you, this should help me get started.