Closed
Bug 1361475
Opened 8 years ago
Closed 8 years ago
AudioContext() constructor should not throw error when invoked with argument
Categories
(Core :: Web Audio, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: tomerlahav, Assigned: padenot)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36
Steps to reproduce:
Run the following code:
new AudioContext({latencyHint: 'playback'});
Actual results:
Error is thrown:
TypeError: Argument 1 of AudioContext.constructor '[object Object]' is not a valid value for enumeration AudioChannel.
Expected results:
At the very least, this should not throw an error.
AudioContext() constructor should accept an options argument:
https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/AudioContext
Comment 1•8 years ago
|
||
current implementation doesn't match to the spec.
https://dxr.mozilla.org/mozilla-central/rev/48c0fd9c9ec5d68061ea7b59358874ae8da72572/dom/webidl/AudioContext.webidl#14
> [Constructor,
> Constructor(AudioChannel audioChannelType),
> Pref="dom.webaudio.enabled"]
> interface AudioContext : BaseAudioContext {
https://dxr.mozilla.org/mozilla-central/rev/48c0fd9c9ec5d68061ea7b59358874ae8da72572/dom/webidl/AudioChannel.webidl#41-50
> enum AudioChannel {
> "normal",
> "content",
> "notification",
> "alarm",
> "telephony",
> "ringer",
> "publicnotification",
> "system"
> };
Status: UNCONFIRMED → NEW
Component: Untriaged → Web Audio
Ever confirmed: true
Product: Firefox → Core
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → padenot
Comment hidden (mozreview-request) |
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8864498 [details]
Bug 1361475 - Remove proprietary constructor on AudioContext.
https://reviewboard.mozilla.org/r/136172/#review139160
Attachment #8864498 -
Flags: review?(amarchesini) → review+
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/autoland/rev/68543862570f
Remove proprietary constructor on AudioContext. r=baku
Updated•8 years ago
|
Rank: 25
Priority: -- → P2
Comment 5•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•8 years ago
|
Keywords: dev-doc-needed
Comment 6•7 years ago
|
||
Updated documents:
https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/AudioContext
https://developer.mozilla.org/en-US/Firefox/Releases/55#Web_Audio_API
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•