Skip to content

Commit 5030e78

Browse files
committed
feat: add a default audio codec for the HLS video player
This seems to reduce instances of audio garbling when switching levels during HLS video streaming.
1 parent dc7db1d commit 5030e78

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

xmodule/assets/video/public/js/02_html5_hls_video.js

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

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

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

0 commit comments

Comments
 (0)