Skip to content

Commit 68322bc

Browse files
authored
feat: add a default audio codec for the HLS video player (openedx#37525)
2 parents 43f31d8 + 45b72a0 commit 68322bc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

xmodule/js/src/video/02_html5_hls_video.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
// do common initialization independent of player type
2727
this.init(el, config);
2828

29+
// set a default audio codec if not provided, this helps reduce issues
30+
// switching audio codecs during playback
31+
if (!this.config.defaultAudioCodec) {
32+
this.config.defaultAudioCodec = "mp4a.40.5";
33+
}
34+
2935
_.bindAll(this, 'playVideo', 'pauseVideo', 'onReady');
3036

3137
// If we have only HLS sources and browser doesn't support HLS then show error message.

0 commit comments

Comments
 (0)