Closed Bug 1023175 Opened 11 years ago Closed 11 years ago

AudioContext should have attribute EventHandler onmozinterruptend/begin in the webIDL interface

Categories

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

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33
feature-b2g 2.0
Tracking Status
firefox31 --- wontfix
firefox32 --- fixed
firefox33 --- fixed
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

(Whiteboard: ft:loop)

Attachments

(1 file)

No description provided.
Attached patch webaudio.patchSplinter Review
Attachment #8437599 - Flags: review?(ehsan)
These attributes are non-standard, so I feel a bit bad about just adding them here. Can we just rely on addEventListener/etc for these events? I'm curious to know what Olli thinks about that.
Flags: needinfo?(bugs)
Well, if we have non-standard events (why?), adding those properties doesn't sound too bad to me.
Flags: needinfo?(bugs)
(In reply to Olli Pettay [:smaug] from comment #3) > Well, if we have non-standard events (why?), adding those properties doesn't > sound too bad to me. Any audio component should notify the content code when it's muted from the AudioChannelService. This happens for HTMLMediaElement and for WebAudio.
Summary: AudioContest should have attribute EventHandler onmozinterruptend/begin in the webIDL interface → AudioContext should have attribute EventHandler onmozinterruptend/begin in the webIDL interface
Comment on attachment 8437599 [details] [diff] [review] webaudio.patch Andrea can you please reset the flag when this is ready for review? Thanks!
Attachment #8437599 - Flags: review?(ehsan)
padenot, this patch introduces 2 new events in AudioContext: mozinterruptbegin and mozinterruptend. These 2 events are useful for b2g and they are dispatched when the AudioChannelService mutes the AudioDestinationNode because of some audio channel policy: https://wiki.mozilla.org/WebAPI/AudioChannels These are not part of the webaudio spec and I would like to know if you have any interest to propose them for the spec. Or maybe there is already something similar. I also would like to know what you think about adding this 'moz'-prefixed events in the webidl interface. At the moment these 2 events are already dispatched and they are available via 'addEventListener'.
Flags: needinfo?(paul)
(In reply to Andrea Marchesini (:baku) from comment #6) > padenot, this patch introduces 2 new events in AudioContext: > mozinterruptbegin and mozinterruptend. These 2 events are useful for b2g and > they are dispatched when the AudioChannelService mutes the > AudioDestinationNode because of some audio channel policy: > https://wiki.mozilla.org/WebAPI/AudioChannels > > These are not part of the webaudio spec and I would like to know if you have > any interest to propose them for the spec. Or maybe there is already > something similar. Indeed, we are thinking about something relatively similar: https://github.com/WebAudio/web-audio-api/issues/317 (ability to suspend the AudioContext). This is something Google people need, and, in fact, we need that too (they have very legitimate use cases we already solved in a hackish way). I'll propose that to the spec (they don't have events for now, only two methods, start and resume), I'll keep the NEEDINFO as a reminder. > I also would like to know what you think about adding this 'moz'-prefixed > events in the webidl interface. At the moment these 2 events are already > dispatched and they are available via 'addEventListener'. That's fine. I think we like to put them in a separate section and label them clearly as "proprietary Mozilla extension", until they are specced.
> Indeed, we are thinking about something relatively similar: > https://github.com/WebAudio/web-audio-api/issues/317 (ability to suspend the > AudioContext). This is something Google people need, and, in fact, we need > that too (they have very legitimate use cases we already solved in a hackish > way). I'll propose that to the spec (they don't have events for now, only > two methods, start and resume), I'll keep the NEEDINFO as a reminder. Good. Something important about this topic is this feature: bug 923247. We don't expose AudioChannelService feature but just the AudioChannel and they can be muted based on their policy. Ehsan, can you review this patch? The 2 events are already in a separated mozilla section of the interface.
Attachment #8437599 - Flags: review?(ehsan)
Attachment #8437599 - Flags: review?(ehsan) → review+
Comment on attachment 8437599 [details] [diff] [review] webaudio.patch It seems I need the review from a DOM peer. Smaug?
Attachment #8437599 - Flags: review?(bugs)
Question, why do we want to add a moz- prefixed thing? Why not without moz-prefix? Assuming this stuff gets spec'ed.
Comment on attachment 8437599 [details] [diff] [review] webaudio.patch But since this isn't enabled by default, fine. Are the events about muting the sound or about pausing? The comment talks about "muted", but interrupt sounds like pausing. Please clarify the comment.
Attachment #8437599 - Flags: review?(bugs) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Flags: needinfo?(paul)
This bug blocks bug 1016277. It should be included in v2.0 release.
blocking-b2g: --- → 2.0?
(In reply to José Antonio Olivera Ortega [:jaoo] from comment #14) > This bug blocks bug 1016277. It should be included in v2.0 release. bug 1016277 is considered a feature though. In that case, this shouldn't block & should seek approval for 2.0.
blocking-b2g: 2.0? → ---
Blocks: 1016277
feature-b2g: --- → 2.0
Whiteboard: ft:loop
(In reply to Jason Smith [:jsmith] from comment #15) > (In reply to José Antonio Olivera Ortega [:jaoo] from comment #14) > > This bug blocks bug 1016277. It should be included in v2.0 release. > > bug 1016277 is considered a feature though. In that case, this shouldn't > block & should seek approval for 2.0. IMHO bug 1016277 is a critical bug as two different apps using the telephony audio channel play audio at the same time.
(In reply to José Antonio Olivera Ortega [:jaoo] from comment #16) > (In reply to Jason Smith [:jsmith] from comment #15) > > (In reply to José Antonio Olivera Ortega [:jaoo] from comment #14) > > > This bug blocks bug 1016277. It should be included in v2.0 release. > > > > bug 1016277 is considered a feature though. In that case, this shouldn't > > block & should seek approval for 2.0. > > IMHO bug 1016277 is a critical bug as two different apps using the telephony > audio channel play audio at the same time. I would call that bug feature work because it's the feature work required to get privileged access for telephony. We shouldn't have flipped the switch for privileged access for telelphony actually until that was fixed, but it's too late to change that now.
Comment on attachment 8437599 [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 #8437599 - Flags: approval-mozilla-aurora?
Attachment #8437599 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Depends on: 1196062
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: