hls.js icon indicating copy to clipboard operation
hls.js copied to clipboard

Audio doesnt switch instantly on Track Switch

Open sharankumarreddy19 opened this issue 3 years ago • 1 comments

What version of Hls.js are you using?

1.1.5

What browser (including version) are you using?

WPE Browser

What OS (including version) are you using?

RDK

Test stream

No response

Configuration

{
maxBufferLength:3,
manifestLoadingMaxRetry:4
}

Additional player setup steps

No response

Checklist

  • [X] The issue observed is not already reported by searching on Github under https://github.com/video-dev/hls.js/issues
  • [X] The issue occurs in the stable client (latest release) on https://hls-js.netlify.com/demo and not just on my page
  • [X] The issue occurs in the latest client (main branch) on https://hls-js-dev.netlify.com/demo and not just on my page
  • [X] The stream has correct Access-Control-Allow-Origin headers (CORS)
  • [X] There are no network errors such as 404s in the browser console when trying to play the stream

Steps to reproduce

  1. Click on Audio Settings 2.Change the track from one audio track to other audio track 3.Wait for the audio change

Expected behaviour

On Changing the track to other audio track it should immediately switch to the another language audio

What actually happened?

The switching is taking time to reflect,it is different on different contents,unfortunately couldnt share the content as it is restricted

Console output

NA

Chrome media internals output

No response

sharankumarreddy19 avatar Jul 19 '22 06:07 sharankumarreddy19

Not a Contribution

Hi @sharankumarreddy19,

When you select a different audio track a number of things needs to happen:

  1. Empty the audio buffer of all buffered media
  2. Load the track playlist (if not already loaded)
  3. Load and append audio segment(s) to the audio buffer

All this takes time which will vary depending on network and platform conditions and capabilities. If you want to stop playback so that the last audio track is not played while this is happening, pause the media element before selecting a new track, select the new track, and then unpause once enough audio is buffered (this would be done as part of your "Audio Settings" implementation. In the future please refer to API methods in repro steps.

Preloading of alternate audio tracks is not supported at this time.

robwalch avatar Jul 19 '22 23:07 robwalch