Closed Bug 1177399 Opened 9 years ago Closed 9 years ago

Enable AudioChannelService in desktop by default

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox41 --- affected
firefox42 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(2 files, 3 obsolete files)

We need this component for a couple of new features. Let's use this bug as a meta bug for any possible dependence.
Blocks: 1156472
Attached patch default.patch (obsolete) — Splinter Review
Attachment #8632694 - Flags: review?(ehsan)
Assignee: nobody → amarchesini
Comment on attachment 8632694 [details] [diff] [review]
default.patch

Review of attachment 8632694 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/app/mobile.js
@@ +795,5 @@
>  
> +// Make <audio>, <video> and webAudio talk to the AudioChannelService.
> +pref("media.useAudioChannelService", true);
> +// Add Mozilla AudioChannel APIs.
> +pref("media.useAudioChannelAPI", false);

You should be able to remove these.
Attachment #8632694 - Flags: review?(ehsan) → review+
Blocks: 486262
Attached patch 252588.diffSplinter Review
Attachment #8632694 - Attachment is obsolete: true
Keywords: checkin-needed
sorry had to back this out for test failures like https://treeherder.mozilla.org/logviewer.html#?job_id=11651363&repo=mozilla-inbound
Flags: needinfo?(amarchesini)
Attached patch debug.patch (obsolete) — Splinter Review
It took a while to debug it properly. This patch does:

1. Unregister the actor when unlinked by CC
2. Removed part of a test because enabling the ACS, we enable the AudioChannel Policy and we check if the page has the right permission to change the audiochannel. The permission check has covered by other tests.
Flags: needinfo?(amarchesini)
Attachment #8635275 - Flags: review?(ehsan)
Comment on attachment 8635275 [details] [diff] [review]
debug.patch

Review of attachment 8635275 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with the below fixed.

::: dom/audiochannel/AudioChannelAgent.cpp
@@ +15,5 @@
> +NS_IMPL_CYCLE_COLLECTION_CLASS(AudioChannelAgent)
> +
> +NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(AudioChannelAgent)
> +  if (tmp->mIsRegToService) {
> +    tmp->NotifyStoppedPlaying();

Do you mind refactoring this logic into a helper method and call it both from the Unlink function and the destructor, so that in the future we won't forget to change one but not the other?
Attachment #8635275 - Flags: review?(ehsan) → review+
Attached patch debug.patch (obsolete) — Splinter Review
just because we have an intermittent failure for this CC thing, I split the patch in 2 parts. Point 1 of the previous comment is not in this new patch.
Attachment #8635275 - Attachment is obsolete: true
Attachment #8635285 - Flags: review?(ehsan)
Attachment #8635285 - Attachment is obsolete: true
Attachment #8635285 - Flags: review?(ehsan)
Attachment #8635275 - Attachment is obsolete: false
Keywords: checkin-needed
Attachment #8632880 - Attachment is obsolete: true
Attachment #8632880 - Attachment is obsolete: false
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: