Skip to content

Conversation

@masonblier
Copy link
Contributor

@masonblier masonblier commented Jul 11, 2025

This check for AudioContext state does not work in Firefox as unlike Chromium, Firefox does not automatically set the initial state of the AudioContext to running. Removing this check seems to cause no problems as the audio state is set to disabled by default.

More details about the difference of the initial AudioContext state between browsers is discussed here: WebAudio/web-audio-api#2218

This fixes issue: #463

@kixelated

This check for AudioContext state does not work in Firefox as unlike Chromium, Firefox does not automatically set the initial state of the AudioContext to `running`. Removing this check seems to cause no problems as the audio state is set to disabled by default.
@kixelated
Copy link
Collaborator

I don't know the ramifications of removing this check, but I'll test it and figure out an alternative if needed.

@kixelated kixelated merged commit f400ab3 into moq-dev:main Jul 11, 2025
2 checks passed
@masonblier
Copy link
Contributor Author

Thanks for the merge! I suspect this issue might arise if the audio is enabled by default, but it seems that unlike Video, the Audio class doesn't get signals when broadcast fetchCatalog completes, so the Audio doesn't get started until another signal is received (such as unmuting). I couldn't figure out why Audio doesn't update from the fetchCatalog changes, it does subscribe to the signal, but the function runDecoder never gets called. So I was unable to create a scenario where this would trigger an error.

@masonblier masonblier deleted the patch-1 branch July 11, 2025 19:26
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.

2 participants