feat: add a default audio codec for the HLS video player (#37525)

This seems to reduce instances of audio garbling when switching levels during HLS video streaming.
This commit is contained in:
Nathan Sprenkle
2025-10-29 15:24:33 -04:00
committed by GitHub
parent dc7db1d3ad
commit 6b0af90664

View File

@@ -27,6 +27,12 @@ HLSVideo.Player = (function() {
// 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";
}
_.bindAll(this, 'playVideo', 'pauseVideo', 'onReady');
// If we have only HLS sources and browser doesn't support HLS then show error message.