- From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
- Date: Wed, 17 Jul 2013 11:07:09 +1000
- To: Ian Hickson <ian@hixie.ch>
- Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>, Christian Horn <chorn1@my.uno.edu>
Note that Mozilla have introduced .mozChannels for this: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement . The Web Audio API have created what is called an AudioNode, which includes the number of channels: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioNode-section There is a whole section on how to do up/down mixing: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#UpMix-section You need to use createMediaElementSource to get an MediaElementAudioSourceNode which is a kind of AudioNode and should thus have a channelCount attribute. (see http://updates.html5rocks.com/2012/02/HTML5-audio-and-the-Web-Audio-API-are-BFFs for an example) Is this too much mucking around to just get information about the channel count of an audio track? I don't know... I guess if every use case involves manipulating audio, then the use of the Web Audio API is appropriate. If it's just to display to users more information about the quality of their media files... maybe this is overkill and a simpler interface directly on HTMLMediaElement like .mozChannels would be better. Silvia. On Wed, Jul 17, 2013 at 9:39 AM, Ian Hickson <ian@hixie.ch> wrote: > On Wed, 23 Jan 2013, Christian Horn wrote: >> >> Hello to everybody, unknowingly, >> >> It would be nice to see audioTrack.channels added to the-video-element >> for media resources with multiple media tracks. >> >> It should return the number of channels in the audio track (1 = mono, 2 >> = stereo, 6 = surround, etc). >> >> A use case can be: A user has an encoded video with multiple audio >> tracks. Track 1 and 2 are both English, but one is stereo, one is >> surround. > > Can you elaborate on the use case? Wouldn't the browser be the one in the > best position to know which to pick, in that case? > > -- > Ian Hickson U+1047E )\._.,--....,'``. fL > http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. > Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 17 July 2013 01:07:53 UTC