Closed cwilso closed 8 years ago
I reported the initial issure at w3.org.
We have some mpeg4 Proxy-Files from a professional video-camera with four stereo audiotracks. Our webapp should make it possible to playback all the tracks at the same time, and mix them (volume/panning).
var mediaElement = document.getElementById('mediaElementID');
// May use a more sophisticated logic to find the right Track,
// f.e. dependindung on audioTrack.language oder audioTrack.kind
var audioTrack1 = mediaElement .audioTracks[0];
var trackId1 = audioTrack1.id;
var sourceNode1 = context.createMediaElementSource(mediaElement,trackId1); var sourceNode2 = context.createMediaElementSource(mediaElement,mediaElement .audioTracks[1]) ....
var mediaElement = document.getElementById('mediaElementID'); var audioTrack1 = mediaElement .audioTracks[0];
var sourceNode1 = context.createMediaElementSource(audioTrack1 ); var sourceNode2 = context.createMediaElementSource( mediaElement .audioTracks[2]); ...
This will be implemented with MediaStream
s in #264.
You can do HTMLMediaElement.captureStream()
. This returns a MediaStream
with multiple tracks (on per AudioTrack
). You can then create route those tracks into Web Audio using the new MediaStreamTrackAudioSourceNode
, and process the tracks as needed.
Closing this one, as #264 has a pull-request already in flight.
Reported to HTML (https://www.w3.org/Bugs/Public/show_bug.cgi?id=26534), but this is really a requirement on how we create MediaElementSourceNodes.
Change MediaElementSource definition in Web Audio to create one output per track on the media element node, rather than a single output.