Closed Bug 828200 Opened 11 years ago Closed 11 years ago

Incall video playback doesn't work

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:tef+, blocking-basecamp:-, firefox19 wontfix, firefox20 wontfix, firefox21 fixed, b2g18 fixed, b2g18-v1.0.0 fixed)

VERIFIED FIXED
B2G C4 (2jan on)
blocking-b2g tef+
blocking-basecamp -
Tracking Status
firefox19 --- wontfix
firefox20 --- wontfix
firefox21 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- fixed

People

(Reporter: m1, Assigned: baku)

References

Details

(Whiteboard: [cr 437189][cr 437188] [LOE:S][triage:1/16])

Attachments

(1 file)

STR
1. Make/Receive a call
2. Goto Videos application and start playing a video clip
3. Video playback doesn't start

Expected: In all video playback should be possible
cc'ing a few people who might have an idea what's going on here.

My guess is that the problem is somewhere with the hardware decoding.
blocking-b2g: --- → tef+
blocking-basecamp: ? → -
Actually, this is totally by design!

The telephony channel has a higher priority than the telephony channel. So the audio priority system will pause any audio from other sources so that you can properly hear the phone call.

I think we all agree that any video/music that is playing should be paused when you start a phone call, so that part is desired.

This is currently implemented by having the platform forcably pause all <audio> and <video> elements as soon as there's an ongoing telephony call.

But this also leads to that the user can't intentionally start audio-playing things while on a call, which also is bad.

However the question is how we would enable that while also protecting the user from poorly created applications which happen to start playing audio while the user is on a call. I.e. if you have a game in the background which happens to start a loud sound effect a few seconds after you start a call that is also bad.

Likewise, it also seems bad if you enter a webpage while on a call and the webpage suddenly starts blasting music. We have no way of verifying which actions that a page takes are in response to an intentional user action to turn on some audio thing, and which ones are in response to the user doing something else.
blocking-b2g: tef+ → ---
blocking-basecamp: - → ?
Works in Android FWIW.
One way to handle this would be something like this:

If the currently active channel is the telephony channel, we allow other lower-privilege channels to mix with that channel. But we only allow that for lower-privilege channels which are being played in applications which are visible. I.e. when the telephony channel is used we mute lower privileged channels, but not for elements in hidden applications.

The effects of this would be the following:

If you make or receive a call and then switch to the music app, you can start the music as normal. However if you switch away from the music app, for example back to the telephony app, the music will be muted again.

If there is music playing when you receive a phone call, the music will be muted. If you then switch to the music app, while still on the call, the music will start playing automatically.

If you are on a phone call, and then open a web page, the web page can start playing audio without any user interaction. Leaving the browser will automatically mute the webpage audio again (the telephony will of course not be muted).


If this sounds ok to everyone, this shouldn't be more than a days worth of work to implement.
The solution looks good to me!

The one issue that I see with this is what audio volume are we adjusting when using the volume keys?   

I propose that we adjust the audio of the current focused application.   If you are in the dialer the call audio will be adjusted.  If you are in the music player and playing music audio will be adjusted.

What do you think?
Flags: needinfo?(kyee)
This sounds ok with me.

Checking with Michael if this proposed solution (comment 5 and comment 6) sounds ok.
Flags: needinfo?(mvines)
Yes, this would satisfy the audio concurrency test case.  Thanks!
Flags: needinfo?(mvines)
Assignee: nobody → amarchesini
blocking-b2g: --- → tef+
blocking-basecamp: ? → -
Attached patch patchSplinter Review
This patch let play any visible audio channel, doesn't matter if something more important is playing in background.

I think this is the right behaviour because if the user is in a call, or if alarm is fired, an the meantime he/she wants to play a video, or play a game, we should let any foreground app plays.
Attachment #700962 - Flags: review?(jonas)
Marco: could you see if you can review this while Jonas is out of the office?
(In reply to Faramarz (:faramarz) from comment #13)
> Marco: could you see if you can review this while Jonas is out of the office?

I agreed with this patch and it can achieve what we want in Comment 5.
But it can not fit comment 6.

Ex: During voice-call in progress and music app in foreground, 
  1. this patch allowed music app to play songs. 
  2. When pressing volume keys, the voice-call volume (telephony channel) will be adjusted not music (content channel). Because the logical now will adjust highest audio channel type not the one in the foreground.
So if comment 6 is fired as another bug, I can give review+.
(Note that I am not the peer of that module.)
Blocks: 829561
830672 is for the comment 6.
Depends on: 830672
Blocks: 829364
Whiteboard: [cr 437189] → [cr 437189][cr 437188]
LOE:S based on a patch existing :)
Whiteboard: [cr 437189][cr 437188] → [cr 437189][cr 437188] [LOE:S]
Comment on attachment 700962 [details] [diff] [review]
patch

I think blocking the audio in the foreground (focused by user) is not a good user experience. So agree this patch and actually it is a similar patch on bug 829364.
Attachment #700962 - Flags: review+
Attachment #700962 - Flags: review?(jonas) → review+
Whiteboard: [cr 437189][cr 437188] [LOE:S] → [cr 437189][cr 437188] [LOE:S][triage:1/16]
Verified that it fixes concurrent call + music/video/camera. This will knock off 3 of our P1 issues. Can this be integrated to b2g18 quickly.
Thanks.
b2g18 tree is closed atm but this is green on our integration tree so we'll uplift asap.
Target Milestone: --- → B2G C4 (2jan on)
Blocks: 834426
Landed on mozilla-b2g18/gaia master prior to the 1/25 branching to mozilla-b2g18_v1_0_0/v1.0.0, updating status-b2g-v1.0.0 to fixed.
In call video playback does work

Verified  on Unagi Build ID: 201302014070203
Kernel: Dec 5
Gecko  http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/a9e4f8912607
Gaia   21ba59d933c66024cb351c2379315301d5352e0c
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: