Skip to content

Conversation

@nsprenkle
Copy link
Member

Description

I found that setting a default audio codec (defaultAudioCodec = "mp4a.40.5") helps reduce issues in HLS streams switching bitrates mid-stream.

After several attempt to set this config (#19 and #21) I found that I needed to set the config much higher up the initialization chain to actually set that value all the places that are used in the level switching process.

Third time's the charm?

Deadline

ASAP but also I probably won't be able to monitor rollout 🤷

This causes it to get picked up in the places that it is actually
needed to handle issues in audio quality switching.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the default audio codec configuration for HLS video playback by moving the defaultAudioCodec setting from the HLS video player constructor to the caller. Instead of setting a default value inside the HLSVideo.Player constructor when not provided, the default value "mp4a.40.5" is now explicitly passed as a configuration parameter when creating the HLS video player instance.

  • Removed conditional logic for setting defaultAudioCodec inside the HLS video player constructor
  • Added explicit defaultAudioCodec: "mp4a.40.5" parameter when instantiating HTML5HLSVideo.Player

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
xmodule/js/src/video/02_html5_hls_video.js Removed conditional logic that sets a default audio codec if not provided
xmodule/js/src/video/03_video_player.js Added explicit defaultAudioCodec parameter with default value when creating HLS video player instance

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nsprenkle nsprenkle enabled auto-merge (squash) October 30, 2025 21:01
@nsprenkle nsprenkle merged commit fb38622 into release-ulmo Oct 30, 2025
63 checks passed
@nsprenkle nsprenkle deleted the nsprenkle/video-default-audio-codec-fix-2 branch October 30, 2025 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants