This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17345 - Access to individual AudioTracks
Summary: Access to individual AudioTracks
Status: CLOSED WONTFIX
Alias: None
Product: AudioWG
Classification: Unclassified
Component: Web Audio API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: TBD
Assignee: This bug has no owner yet - up for the taking
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-05 11:37 UTC by Philip Jägenstedt
Modified: 2014-10-28 17:17 UTC (History)
4 users (show)

See Also:


Attachments

Description Philip Jägenstedt 2012-06-05 11:37:40 UTC
Audio-ISSUE-54 (MediaElementAudioSourceNode): MediaElementAudioSourceNode [Web Audio API]

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

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

HTMLMediaElement is integrated into Web Audio API using the MediaElementAudioSourceNode interface and createMediaElementSource. This looks like an unnecessarily complicated way of making the connection.

Suggestion:

Extend the HTML AudioTrack interface [1] with an "AudioSourceNode node" member. This allows us to use multiple audio tracks from a single HTMLMediaElement.

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#audiotrack
Comment 1 Chris Rogers 2012-10-16 20:19:21 UTC
Ian Hickson and I had discussed the trade-off of these two approaches a while back.  He suggested that with the current approach (with create() method) that we can keep the two APIs well-factored, and not need to change the HTMLMediaElement spec.

Also, I don't think that the create() approach is very complex at all.  It's true that it adds one more line of JS, but this is a very small cost and it's consistent with other source nodes such as createBufferSource().

We've already had plenty of people using this API, and nobody has complained about this particular aspect.
Comment 2 Olivier Thereaux 2012-10-24 09:27:32 UTC
Philip, any thought given the recent changes in http://dvcs.w3.org/hg/audio/rev/9224fb26e77d ?
Comment 3 Philip Jägenstedt 2012-10-24 09:42:37 UTC
That change was in response to Bug 17346 and looks fine to me.

As for createMediaElementSource() vs a property on AudioTrack, I'm fine with keeping a create method for consistency and API separation.

What remains unresolved is the issue of multi-track resources. If instead of a createMediaElementSource we had a createAudioTrackSource, the issue of what to do with media elements without any audio goes away, and it's also possible to process the audio streams separately. Should I file a new bug for this?
Comment 4 Olivier Thereaux 2012-10-24 09:47:41 UTC
(In reply to comment #3)
> What remains unresolved is the issue of multi-track resources. If instead of
> a createMediaElementSource we had a createAudioTrackSource, the issue of
> what to do with media elements without any audio goes away, and it's also
> possible to process the audio streams separately. Should I file a new bug
> for this?

Makes sense. Let's keep it here - care to change/clarify the issue name? (If you can... not sure what the typical Bugzilla rights are these days)
Comment 5 Philip Jägenstedt 2012-10-24 11:14:48 UTC
OK, reopened and changed name.
Comment 6 Olivier Thereaux 2014-10-28 17:14:13 UTC
Web Audio API issues have been migrated to Github. 
See https://github.com/WebAudio/web-audio-api/issues
Comment 7 Olivier Thereaux 2014-10-28 17:17:05 UTC
Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.