Bug 17323 - Use WebIDL enumerations, not numeric constants
Use WebIDL enumerations, not numeric constants
Status: CLOSED INVALID
Product: AudioWG
Classification: Unclassified
Component: Web Audio API
unspecified
PC All
: P2 normal
: TBD
Assigned To: Ehsan Akhgari [:ehsan]
This bug has no owner yet - up for the taking
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-05 11:15 UTC by Philip Jägenstedt
Modified: 2012-09-10 10:15 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Jägenstedt 2012-06-05 11:15:44 UTC
Audio-ISSUE-18 (NumericConstants): Use WebIDL enumerations, not numeric constants [Web Audio API]

http://www.w3.org/2011/audio/track/issues/18

Raised by: Philip Jägenstedt
On product: Web Audio API

http://dev.w3.org/2006/webapi/WebIDL/#idl-enums

Use of numeric constants in interface definitions is not good practice for new specs. The WebRTC WG has resolved to move away from this:

http://lists.w3.org/Archives/Public/public-script-coord/2012JanMar/0166.html
http://lists.w3.org/Archives/Public/public-script-coord/2012JanMar/0320.html

In HTML, TextTrack.mode was recently changed to enumerations after similar feedback:

http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#texttrackmode

These are the members with numeric constants in the Web Audio API spec:

AudioBufferSourceNode.playbackState
AudioPannerNode.panningModel
AudioPannerNode.distanceModel
BiquadFilterNode.type
Oscillator.type
Oscillator.playbackState
Comment 1 Olivier Thereaux 2012-06-07 15:54:40 UTC
Comments from Chris Rogers, 18 May 2012

Agreed - looking into the details of the exact WebIDL syntax...

http://dev.w3.org/2006/webapi/WebIDL/#idl-enums
Comment 2 Ehsan Akhgari [:ehsan] 2012-08-24 19:33:42 UTC
Web IDL enumerations are only meant to be used for strings.
Comment 3 Olivier Thereaux 2012-09-10 10:15:56 UTC
WebIDL fixed per Bug 17777.