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

RESOLVED WONTFIX

Status

Firefox OS
AudioChannel
RESOLVED WONTFIX
3 years ago
3 months ago

People

(Reporter: borjasalguero, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
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)
(Reporter)

Updated

3 years ago
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)
(Reporter)

Updated

3 years ago
Blocks: 1139838

Comment 3

3 months ago
Firefox OS is not being worked on
Status: NEW → RESOLVED
Last Resolved: 3 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.