-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switching audio tracks is not working properly #6962
Comments
The buffered audio is not being flushed because both audio tracks share the same name and language. You could workaround the issue by changing the name of the media tag with CHARACTERISTICS="public.accessibility.describes-video" to something like "Svenska (audio description)" Tracks with different characteristics are not identical so hls.js should flush the buffered audio on track change. Thank you for reporting this bug. I'll come up with a fix and patch the latest stable release. |
hls.js/src/controller/audio-stream-controller.ts Lines 1022 to 1031 in 8a7812e
There are helper functions like |
Here's the fix in main #6963. After merging we can cherry pick it into patch/v1.5.x and cut release v1.5.20. |
Thank you so much, @robwalch , for checking and solving the issue. You make my day! :) |
What version of Hls.js are you using?
1.5.19
What browser (including version) are you using?
Chrome 132.0.6834.83
What OS (including version) are you using?
Windows 10, Mac OS X, Ubuntu 22.04
Test stream
https://hlsjs.video-dev.org/demo/?src=https%3A%2F%2Fqcdn.screen9.com%2Fmedia%2Fm%2FH%2FmHZBquU3eCmLzwO3vXq0Vg_auto_hls.ssl.m3u8%3Fauth%3DPGeCUq3_tpmkQlOOdC3ALUPdIvQ21OPGUDvSbUe2jOyHo1jn2fTXw0vOyynaj02hYzdamtkti3LZt69sXFpjjw&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ==
Configuration
Additional player setup steps
No response
Checklist
Steps to reproduce
Expected behaviour
Throughout the entire length of the video, you should hear the original audio track without any narrator comments from the audio description.
What actually happened?
When the audio track is switched to the audio description track between 0-5 seconds of the video, then after switching back to the original track and replaying the video from the beginning, you will hear the narrator's voice from the audio description track until the 5th second. After the 5th second, the correct original audio track will play.
If the switch to the audio description track occurs between 5-10 seconds, then after switching back to the original track, you will hear the original track from 0 to 5 seconds and from 10 seconds to the end of the video. However, between 5-10 seconds, the narrator's voice from the audio description track will still play.
In general, strange behavior occurs when switching between audio tracks multiple times. I tested this video on other players, and audio track switching worked without issues, so I believe this is unlikely to be a problem with the HLS playlist itself but who knows...
I would appreciate any suggestions and would be happy to provide additional information if needed.
Console output
Chrome media internals output
The text was updated successfully, but these errors were encountered: