Closed Bug 796514 Opened 12 years ago Closed 11 years ago

[Dialer] Other Audio other than from dialer should stop when dialer audio is running.

Categories

(Firefox OS Graveyard :: Gaia::Dialer, defect)

defect
Not set
normal

Tracking

(blocking-basecamp:-)

RESOLVED WORKSFORME
blocking-basecamp -

People

(Reporter: ghtobz, Assigned: etienne)

References

Details

(Whiteboard: [label:dialer])

[GitHub issue by nhirata on 2012-08-22T18:37:32Z, https://github.com/mozilla-b2g/gaia/issues/3720]
## Environment :
Otoro phone, build 2012-08-22
Taken from default.xml in b2g-distro: 
* "platform_build" revision= 76e88b579737d7b5078063dcbec60c2ad2c70465
* "gaia" revision= fba1615ca8a4b39278dcaf239c15888ab2dbfb81 
* "mozilla-central" revision= e5f5dc9d14f54bdf6cc6fc0a45309f79836bee0d
* "gonk-misc" revision= 1e886650c960f1464af4afe4fd664daeed790117

## Repro :
1. go to music app
2. play a song
3. hit home while the song is playing
4. go to dialer
5. type in numbers

## Expected :
1. music stops playing, numbers are dialing

## Actual :
1. music plays while the tones go on.

## Note :
1. all other audio needs to stop if you get a call or if you are calling someone.
[GitHub comment by dominickuo on 2012-08-23T10:48:25Z]
@jcarpenter I remembered there is a thread talking about this issue, can you comment this?
[GitHub comment by jcarpenter on 2012-08-24T04:13:44Z]
@dominickuo Sorry, I can't recall that conversation. The following is true, however:

> all other audio needs to stop if you get a call or if you are calling someone.

But in the case of outgoing calls, we do not cut out other audio feeds until the user presses "Dial".
[GitHub comment by autonome on 2012-09-12T16:15:01Z]
assigning to @etiennesegonzac to figure out if it's lower-level or some other part of comms apps.
[GitHub comment by autonome on 2012-09-12T16:16:52Z]
Sorry, misunderstood in triage. This is *not* a blocker, but would be nice polish for V1.
[GitHub comment by tonychung on 2012-09-12T16:20:29Z]
I can't reproduce this on the 9-11-2012 otoro daily.   Launching the dialer, and tapping the numbers , initially doesnt have any sound, but eventually i can hear the keypad tones.   And the music playback does stop.
Component: Gaia → Gaia::Dialer
## Environment :
Gecko  http://hg.mozilla.org/releases/mozilla-b2g18/rev/0e43266ca3c6
Gaia   1890022f3ca36108621a832f31ac5df8bf89a22e
BuildID 20130122070203
Version 18.0
Unagi

## Repro :
1. in the browser go to www.youtube.com
2. play a youtube video
3. on a different phone call the b2g device

## Expected :
1. youtube video stops, you can hear the ringing by itself as well as the received call

## Actual :
1. youtube video continues, you can hear both youtube and ring as well as hear the video while on the received call.  on the receiving end you can hear the call as well.

## Note :
1. you can still hear with or without headphones, with headphones is even more clear
2. music app behaves as expected now
3. fm radio has a separate different issue ( noted in bug 830657, radio completely stops playing when interrupted; can't seem to get it to play again without reboot)
4. video behaves somewhat as expected; it completely stops the video, you can't continue... going to log a separate bug.
5. browser (going to songcloud.com) behaves as expected.
Bug reproduced as Naoki commented above with 2012/23/01 build:
Gaia 1890022
Gecko 6a506d1
Keywords: qawanted
Ah thanks isabel. I forgot to remove qawanted.
I think this issue should be the same with bug 833268. Because the AudioChannel type in dialer app set to 'ringer' and it muted the sound playing in Music app. Changing mozAudioChannelType in dialer app to 'normal' can mix the sound in both app. Changing to 'normal' is not a solution because volume can't be adjusted any more. This issue will depends on the patch in bug 832170 and then check again if we still have issue on it.
Depends on: 832170
(In reply to vliu from comment #9)
> I think this issue should be the same with bug 833268. Because the
> AudioChannel type in dialer app set to 'ringer' and it muted the sound
> playing in Music app. Changing mozAudioChannelType in dialer app to 'normal'
> can mix the sound in both app. Changing to 'normal' is not a solution
> because volume can't be adjusted any more. This issue will depends on the
> patch in bug 832170 and then check again if we still have issue on it.

Sorry, I am not clear to mention about which STR I used since this issue have two STRs. The conclusion I added is the STR for Description not for Comment 6.
Hi Alive,

Could you help to check comment 6?
It seems to be related to youtube player issue on Bug 833211.

Thanks.
Flags: needinfo?(alive)
Don't think so. Any way the playing youtube shouldn't have higher priority than ringer right?
Ringer is expected to interrupt any audio playing no matter normal or content.
Flags: needinfo?(alive)
(In reply to Alive Kuo [:alive] from comment #12)
> Don't think so. Any way the playing youtube shouldn't have higher priority
> than ringer right?
> Ringer is expected to interrupt any audio playing no matter normal or
> content.

You are right about priority relationship. But currently AudioChannelService will allow any channels in the foreground to play. This means that the possible reason here is that youtube player doesn't be notified that it is on the background now. 

Is it related to that Browser app UI is OOP already but control part is still in Chrome process.
(In reply to Marco Chen [:mchen] from comment #13)
> (In reply to Alive Kuo [:alive] from comment #12)
> > Don't think so. Any way the playing youtube shouldn't have higher priority
> > than ringer right?
> > Ringer is expected to interrupt any audio playing no matter normal or
> > content.
> 
> You are right about priority relationship. But currently AudioChannelService
> will allow any channels in the foreground to play. This means that the
> possible reason here is that youtube player doesn't be notified that it is
> on the background now. 
> 
> Is it related to that Browser app UI is OOP already but control part is
> still in Chrome process.

Not related IMO. Just because we don't set iframe visibility for activity frame. According to your comment my answer is bug 833211 is the same as this bug's comment 6.
Ok, so about giving the youtube player a right visibility change, do you want to give a fix in this bug or 833211?

Thanks.
This is a very old issue from GH. Fix in bug 833211 would be more suitable.
In an effort to clean up the component I've tried to reproduce this (specifically comment 6). I've tested both calling the phone while playing a YouTube video in the browser and while listening to the music player. In both cases the YouTube/player audio stopped and the phone started to ring immediately afterwards without any kind of overlapping between the two so I'm closing as WORKSFORME, feel free to re-open if we hit the problem again (and if you do please post a new STR).
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.