Closed Bug 1021084 Opened 10 years ago Closed 10 years ago

WebAudio should dispatch mozinterruptbegin and mozinterruptend when AudioChannelService mutes the AudioChannelDestination node.

Categories

(Core :: Web Audio, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32
Tracking Status
firefox32 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(1 file, 1 obsolete file)

Currently HTMLMediaElement dispatches these 2 events and they are useful for ffos apps. We should do something similar in WebAudio as well.
Attached patch webaudio.patch (obsolete) — Splinter Review
Would like to write a mochitest but I don't know how to make the all document hidden. I tested it changing tabs. Any solution is welcome.
Attachment #8435145 - Flags: review?(ehsan)
Component: DOM → Web Audio
Comment on attachment 8435145 [details] [diff] [review]
webaudio.patch

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

::: content/media/webaudio/AudioDestinationNode.cpp
@@ +435,5 @@
> +  SetCanPlay(playing);
> +
> +  return Context()->DispatchTrustedEvent(
> +           playing ? NS_LITERAL_STRING("mozinterruptend")
> +                   : NS_LITERAL_STRING("mozinterruptbegin"));

Nit: please keep returning NS_OK here.

::: content/media/webaudio/AudioDestinationNode.h
@@ +93,5 @@
>    SelfReference<AudioDestinationNode> mOfflineRenderingRef;
>    uint32_t mFramesToProduce;
>  
>    nsCOMPtr<nsIAudioChannelAgent> mAudioChannelAgent;
> +  bool mAudioChannelAgentPlaying;

Nit: please move this down next to the other two bools for better packing.
Attachment #8435145 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/87fc79cf3fe1
Assignee: nobody → amarchesini
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Blocks: 1016277
Comment on attachment 8435294 [details] [diff] [review]
webaudio.patch

Approval Request Comment
[Feature/regressing bug #]: bug 1016277
[User impact if declined]: multiple telephony calls can play audio at the same time.
[Describe test coverage new/current, TBPL]: fully covered.
[Risks and why]: None
[String/UUID change made/needed]: None
Attachment #8435294 - Flags: approval-mozilla-aurora?
Attachment #8435294 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
This landed on m-c prior to the uplift to Aurora (see the Target Milestone, landing date, and the link below), so what's being approved here?
https://hg.mozilla.org/releases/mozilla-aurora/rev/87fc79cf3fe1
Flags: needinfo?(sledru)
Flags: needinfo?(amarchesini)
Ryan, no needs. Thanks.
Flags: needinfo?(amarchesini)
Attachment #8435294 - Flags: approval-mozilla-aurora+
CF comment #8. Sorry. I should have checked that.
Flags: needinfo?(sledru)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: