Closed Bug 1138957 Opened 9 years ago Closed 6 years ago

It's impossible to change 'mozAudioChannelType' in an audio element within an inline activity

Categories

(Firefox OS Graveyard :: AudioChannel, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: borjasalguero, Unassigned)

References

Details

In Gaia, when opening an 'inline' activity, if the code of the app contains an <audio> element or AudioContext object, we can not set 'mozAudioChannelType' (it's always 'normal').

This is happening in several places, for example:
- Open Music App
- Play a song
- Tap on 'share' button, open your test app (for example 'Ringtone')
- Check <audio> element/AudioContext object within the activity

EXPECTED:
mozAudioChannelType must be the one chosen by the developer (in the case of 'Ringtone', must be 'ringer' [1]). This is breaking as well all the priority scheme defined in [2] for AudioChannels.

CURRENTLY:
mozAudioChannelType is 'normal' in any case


[1] https://github.com/mozilla-b2g/gaia/blob/master/apps/ringtones/js/tone_player.js#L146
[2] https://developer.mozilla.org/en-US/docs/Web/API/AudioChannels_API
Flags: needinfo?(amarchesini)
Blocks: 1135680
According to my own tests, the mozAudioChannelType is correctly registered as ringer (5) both in Gecko and Gaia... but the ringer sound is not muting the content audio.
It seems to me that the problem is related to the visibility of the inline activity.
As far as i remember an inline activity doesn't hide the covered app.

How urgent this is? I'm asking this because we are working on the refactoring of the AudioChannel policy. And this issue will be easier to be resolved with the new architecture.

Can you wait for bug 1113086? Alwu and others are working on moving the Audiochannel policy from gecko to the system app and it should land soon-ish.
Flags: needinfo?(amarchesini)
Blocks: 1139838
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.