Closed
Bug 845365
Opened 12 years ago
Closed 12 years ago
audio-channel-changed is not properly emitted when "content" is not playing
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: baku, Assigned: baku)
References
Details
Attachments
(1 file, 1 obsolete file)
1.41 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #718454 -
Flags: review?(mchen)
Comment 2•12 years ago
|
||
Comment on attachment 718454 [details] [diff] [review]
patch
Review of attachment 718454 [details] [diff] [review]:
-----------------------------------------------------------------
Hi Andrea,
What to do in thia patch is covered by Bug 836655 which is reviewed by you.
Or you think you want to modify that part by this patch.
If yes, could you rebase i so I can make sure you know the changed from 836655 already?
Thanks.
Assignee | ||
Comment 3•12 years ago
|
||
> What to do in thia patch is covered by Bug 836655 which is reviewed by you.
> Or you think you want to modify that part by this patch.
Yeah... I'm a bit confused :) your changes is good enough. The only different is that here I do a check for each element. Probably it's better... in some rare corner case.
I'll rebase the patch and review it low-priority. Thanks.
Assignee | ||
Comment 4•12 years ago
|
||
Here the patch rebased. It's low profile, but here we check any element of the array instead just the first one.
Attachment #718454 -
Attachment is obsolete: true
Attachment #718454 -
Flags: review?(mchen)
Attachment #719048 -
Flags: review?(mchen)
Comment 5•12 years ago
|
||
From the code now for adding & removing childID into active list, is any condition there are more then two child ID in the list when checking on the case of background? Thanks.
Assignee | ||
Comment 6•12 years ago
|
||
right now no. But it's possible to have 2 visible apps: keyboard and something else.
Comment 7•12 years ago
|
||
(In reply to Andrea Marchesini (:baku) from comment #6)
>But it's possible to have 2 visible apps: keyboard and
> something else.
The case of two apps you mentioned is for foreground state but the patch here is for checking in the background state. Since code already limited just only one can be kept in the background state, why do we need to check more then index - 0?
Assignee | ||
Comment 8•12 years ago
|
||
> The case of two apps you mentioned is for foreground state but the patch
> here is for checking in the background state. Since code already limited
> just only one can be kept in the background state, why do we need to check
> more then index - 0?
The code doesn't limit the number of apps in background. Any active visible app, is saved in the mActiveContentChildIDs array. If you have 2 active apps, then you send both to foreground, the mActiveContentChildIDs will contain 2 apps IDs (childIDs).
if one of these 2 apps stops playing, the service doesn't remove the chilID from mActiveContentChildIDs (because maybe this is just a short stop/start sequence).
- else if (!mActiveContentChildIDs.IsEmpty() &&
- mChannelCounters[AUDIO_CHANNEL_INT_CONTENT_HIDDEN].Contains(
- mActiveContentChildIDs[0])) {
- higher = AUDIO_CHANNEL_CONTENT;
So maybe mActiveContentChildIDs[0] is not contained by mChannelCounters[AUDIO_CHANNEL_INT_CONTENT_HIDDEN] because that app stopped playing.
Just [1] is still in mChannelCounters[AUDIO_CHANNEL_INT_CONTENT_HIDDEN].
Comment 9•12 years ago
|
||
(In reply to Andrea Marchesini (:baku) from comment #8)
> if one of these 2 apps stops playing, the service doesn't remove the chilID
> from mActiveContentChildIDs (because maybe this is just a short stop/start
> sequence).
>
Pleaser refer to the code link as below. The childID in foreground will be removed from list when it stops to play.
http://mxr.mozilla.org/mozilla-central/source/dom/audiochannel/AudioChannelService.cpp#139
And the link below shows that the childID who is moving to background will be removed from list if there is still a content channel playing in the foreground but not belong to it.
http://mxr.mozilla.org/mozilla-central/source/dom/audiochannel/AudioChannelService.cpp#220
So finally if there is no content channel in the foreground then only one childID will be kept in the list.
http://mxr.mozilla.org/mozilla-central/source/dom/audiochannel/AudioChannelService.cpp#220
Comment 10•12 years ago
|
||
Comment on attachment 719048 [details] [diff] [review]
patch
Review of attachment 719048 [details] [diff] [review]:
-----------------------------------------------------------------
Please refer to comment 9 for why I change the review flag to null.
Thanks.
Attachment #719048 -
Flags: review?(mchen)
Assignee | ||
Comment 11•12 years ago
|
||
We are working on a new AudioChannel API. This bug is not a need.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•