From a1bb42b3857d561e8ce7c703a987c4e6ea7b7a83 Mon Sep 17 00:00:00 2001 From: pkulkark Date: Mon, 16 Dec 2019 11:54:57 +0530 Subject: [PATCH] Enable auto start for HLS if autoadvance is set --- .../lib/xmodule/xmodule/js/src/video/02_html5_hls_video.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/js/src/video/02_html5_hls_video.js b/common/lib/xmodule/xmodule/js/src/video/02_html5_hls_video.js index d241e3b90b..f8df889d13 100644 --- a/common/lib/xmodule/xmodule/js/src/video/02_html5_hls_video.js +++ b/common/lib/xmodule/xmodule/js/src/video/02_html5_hls_video.js @@ -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);