Merge pull request #22539 from open-craft/pooja/fix-autoadvance-not-working-for-hls-videos

Enable auto start for HLS if autoadvance is set
This commit is contained in:
Ned Batchelder
2020-05-11 11:52:52 -04:00
committed by GitHub

View File

@@ -42,7 +42,12 @@
if (config.browserIsSafari) {
this.videoEl.attr('src', config.videoSources[0]);
} else {
this.hls = new HLS({autoStartLoad: false});
// load auto start if auto_advance is enabled
if (config.state.auto_advance) {
this.hls = new HLS({autoStartLoad: true});
} else {
this.hls = new HLS({autoStartLoad: false});
}
this.hls.loadSource(config.videoSources[0]);
this.hls.attachMedia(this.video);