refactor: HLS streamer - improve latency (#1268)
Co-authored-by: Eric Hebert <ehebert@demolitionxp.com>
This commit is contained in:
1 parent
2a924bcd27
commit
6a2a1baaab
1 file changed
+8
-1
@@ -61,7 +61,14 @@ export default class Hlsstreamer extends Mixins(BaseMixin) {
|
||||
if (Hls.isSupported()) {
|
||||
this.hls?.destroy()
|
||||
|
||||
this.hls = new Hls()
|
||||
this.hls = new Hls({
|
||||
enableWorker: true,
|
||||
lowLatencyMode: true,
|
||||
maxLiveSyncPlaybackRate: 2,
|
||||
liveSyncDuration: 0.5,
|
||||
liveMaxLatencyDuration: 2,
|
||||
backBufferLength: 5,
|
||||
})
|
||||
this.hls.loadSource(this.url)
|
||||
this.hls.attachMedia(video)
|
||||
this.hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
||||
|
||||
Reference in new issue
Block a user