Skip to content

[sdl] Remove obsolete mozAudioChannelType workaround#27340

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:remove-mozaudiochanneltype
Jul 14, 2026
Merged

[sdl] Remove obsolete mozAudioChannelType workaround#27340
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:remove-mozaudiochanneltype

Conversation

@sbc100

@sbc100 sbc100 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Remove references to mozAudioChannelType from Mix_LoadWAV and Mix_QuickLoad_RAW in libsdl.js.

This workaround (audio.mozAudioChannelType = 'content') was added in 2014 (commit f0d1529) for Boot to Gecko (B2G) / Firefox OS games so that audio on the content channel would behave correctly when the screen turned off or the app went to the background.

This is safe to remove because:

  1. Firefox OS / B2G was discontinued (~2016) and moved to the Firefox OS Graveyard.
  2. The AudioChannel API and mozAudioChannelType property were removed from Gecko (mozilla-central). Setting mozAudioChannelType has no effect on Firefox desktop or any modern browser.
  3. Bugzilla bug #910340 (When screen is switched off, visibilitychange is not firing when audio is playing) was closed in 2014 as RESOLVED WONTFIX since continuing audio playback when the screen turns off is expected mobile behavior.

See: https://bugzilla.mozilla.org/show_bug.cgi?id=910340

@sbc100 sbc100 requested review from dschuff and juj July 14, 2026 01:52
Remove references to `mozAudioChannelType` from `Mix_LoadWAV` and
`Mix_QuickLoad_RAW` in `libsdl.js`.

This workaround (`audio.mozAudioChannelType = 'content'`) was added in
2014 (commit f0d1529) for Boot to Gecko (B2G) / Firefox OS games so
that audio on the `content` channel would behave correctly when the
screen turned off or the app went to the background.

This is safe to remove because:
1. Firefox OS / B2G was discontinued (~2016) and moved to the Firefox
OS Graveyard.
2. The `AudioChannel` API and `mozAudioChannelType` property were
removed from Gecko (`mozilla-central`). Setting `mozAudioChannelType`
has no effect on Firefox desktop or any modern browser.
3. Bugzilla bug #910340 (`When screen is switched off,
visibilitychange is not firing when audio is playing`) was closed in
2014 as `RESOLVED WONTFIX` since continuing audio playback when the
screen turns off is expected mobile behavior.

See: https://bugzilla.mozilla.org/show_bug.cgi?id=910340
@sbc100 sbc100 force-pushed the remove-mozaudiochanneltype branch from e8ff4f0 to d0ed7cc Compare July 14, 2026 16:20
@sbc100 sbc100 merged commit fa291cc into emscripten-core:main Jul 14, 2026
3 of 19 checks passed
@sbc100 sbc100 deleted the remove-mozaudiochanneltype branch July 14, 2026 16:21
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