Open Bug 1972665 Opened 1 year ago Updated 7 months ago

Audio dies when switching audio tracks (Widevine, Desktop only)

Categories

(Core :: Audio/Video: GMP, defect, P3)

Firefox 141
Desktop
Unspecified
defect

Tracking

()

UNCONFIRMED

People

(Reporter: admin, Unassigned)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0

Steps to reproduce:

  1. Play the Shaka-packager Widevine DRM (EME) HLS-fMP4 - Angel One Demo sample stream on a Firefox browser
  2. Switch the audio track

Not working on:

  • Firefox 139.0.4 (64-bit)
  • Nightly 141.0a1 (2025-06-16) (64-bit)

Working on:

  • Firefox on Android 139.0.4 (Build #2016095887)
  • Nightly on Android 141.0a1 (Build #2016096991)

Actual results:

Audio stopped playing after the buffered segments of the previous audio track played and new audio segments of the new track were loaded

Expected results:

Audio of the new track should start playing

The Bugbug bot thinks this bug should belong to the 'Firefox for Android::General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → General
Product: Firefox → Firefox for Android
Product: Firefox for Android → Firefox
Hardware: Unspecified → Desktop

Hello! Thank you for submitting this issue I have tried to reproduce the issue on my end but unfortunately I wasn't able, with Firefox 141.0a1 and Firefox 139.0.4 on Windows 11.
Could you please answer the following questions in order to further investigate this issue?

Does this issue happen with a new profile? Here is a link on how to create one: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
Does this issue happen in the latest nightly? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/
Do you have any addons installed? If yes could you please list them?
Could you please provide a screen recording or a screen shot with the issue?

Flags: needinfo?(titus.oxx)
QA Contact: tzsoldos

I should firstly mention that I found this bug through HLS.js and already opened an issue there: https://github.com/video-dev/hls.js/issues/6990
It became clear that this was issue with Firefox and not HLS.js, so I opened this bug report.
To reproduce, the steps from my GitHub issue should be performed on the nightly HLS.js demo: https://hlsjs-dev.video-dev.org/demo/

Yes, this issue still happens on the latest build of Nightly (06/18/2025) with a new profile, no addons, on a fresh install of Windows 11.
Screen recording: https://github.com/user-attachments/assets/d3be943f-0428-4179-94a6-9f4a7f1da94b

While there is a workaround to get it working, it should still work out-of-the-box as it does with Chrome/Edge:
https://github.com/video-dev/hls.js/issues/6990#issuecomment-2981007511

Flags: needinfo?(titus.oxx)
Component: General → Audio/Video
Product: Firefox → Core
Attached image image.png —

I managed to reproduce something with this link: https://hlsjs-dev.video-dev.org/demo/, but I don't know if what I found it was described here in the bug (I couldn't open the screen recording), I attached a screenshot. I check first the option "Stop on first stall: " and then play the video, after a few seconds/maybe 1 minute the video stops because in the error section appear "Buffer stalled error".
Maybe it's useful how I tried to reproduce this issue, if I can help with anything else please let me know.

Flags: needinfo?(jsudiaman)

Sorry for the broken link, here is a reupload to MediaFire: https://www.mediafire.com/file/y0sldidnk8soiyn/bug.mp4/file

Not sure why I was ni'd here?

Flags: needinfo?(jsudiaman)

:jolin, would you have any ideas here?

Flags: needinfo?(jolin)

:padenot, would you be able to take a look at this? I did a bit of digging but I figured you might be able to pinpoint this more quickly. To make things more efficient on your side, I've grabbed the following:

Profile with basic information.
Pernosco link for a repro - loads the main page, then manually selects the video and changes audio tracks.
Pernosco link for a direct page load - gets stuck and nothing plays - possibly related, probably not? I note the same behavior from Chrome, so it could just be an issue with the shortcut URLs the page generates.

Let me know if there's any additional debugging information I can provide from my end. Thanks!

Flags: needinfo?(padenot)

I'm not sure how to change the audio track, can someone provide detailed STR?

For debugging, I'd do the following (in pernosco):

  • Search for demuxer init function
  • Search for audio stream init function
  • Search for append calls (the C++ implementation of the js methods)
  • Search for something (maybe the AudioStream shutdown) that will indicate the audio being shutdown

This should make it clear what's going on, by merging tracks, and then finding some kind of error (probably at the demuxer or MediaSource level).

Flags: needinfo?(padenot)
Attached video bug.mp4 —

Thanks for the heads-up re: Pernosco. I'll add a quick repro writeup here - the video in comment #5 shows the repro steps as well. I'll attach it to this report to make sure we have a copy.

  1. Load https://hlsjs-dev.video-dev.org/demo/
  2. In the box on the left with the dropdown and checkboxes, select Shaka-packager Widevine DRM (EME) HLS-fMP4 - Angel One Demo.
  3. Scroll down. Beneath the video are several buttons (Playback, Timeline, Quality-levels, Audio-tracks, Real-time metrics, Buffer & Statistics.
  4. Click “Audio-tracks" if it's not already selected.
  5. Immediately below the row of buttons, several audio tracks will be selectable.
  6. Clicking any of them (e.g. stream_7) should load the new audio track.
Blocks: media-triage
Severity: -- → S3
Priority: -- → P3

Can confirm using the str az provided. Reproduces on MacOS Nightly.

Component: Audio/Video → Audio/Video: GMP
Flags: needinfo?(jolin)
No longer blocks: media-triage
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: