Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions xmodule/js/src/video/02_html5_hls_video.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
// do common initialization independent of player type
this.init(el, config);

// set a default audio codec if not provided, this helps reduce issues
// switching audio codecs during playback
if (!this.config.defaultAudioCodec) {
this.config.defaultAudioCodec = "mp4a.40.5";
}
Comment on lines +31 to +33
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The defaultAudioCodec configuration is set on this.config but is never passed to the HLS constructor. Lines 54 and 56 instantiate HLS with only {autoStartLoad: true/false}. To fix this, include defaultAudioCodec in the HLS configuration object: this.hls = new HLS({autoStartLoad: true, defaultAudioCodec: this.config.defaultAudioCodec});

Copilot uses AI. Check for mistakes.

_.bindAll(this, 'playVideo', 'pauseVideo', 'onReady');

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