RE: How to direct audio/vido streams from HTML5 media element to PeerConnection?

Indeed. Another design is an HTMLMediaElement.getMediaStream() API.

From: LiLi (Z) [mailto:Li.NJ.Li@huawei.com]
Sent: Wednesday, January 30, 2013 1:29 PM
To: public-media-capture@w3.org
Subject: How to direct audio/vido streams from HTML5 media element to PeerConnection?

I wonder if it is possible to send the audio/video streams from a HTML5 <audio>/<video> element to a RTCPeerConnection object [1], such that when played, the stream is display locally and sent to the remote peer.

The easiest way to do this is to drop the HTML5 audioTrack and videoTrack objects [2] obtained from the HTML5 element into the constructor of MediaStream [3].
But this doesn't seem possible as the HTML5 audioTrack and videoTrack interfaces are unrelated to the MediaStreamTrack interface accepted by the constructor.

Thanks.
Li

[1] http://www.w3.org/TR/webrtc/#peer-to-peer-connections
[2] http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement
[3] http://www.w3.org/TR/mediacapture-streams/#mediastreamtrack

Received on Thursday, 31 January 2013 00:59:26 UTC