[whatwg] Stream API feedback
Simon Pieters
simonp at opera.com
Wed Sep 15 01:53:26 PDT 2010
On Wed, 15 Sep 2010 10:26:29 +0200, Nicklas Sandgren
<nicklas.sandgren at ericsson.com> wrote:
> Hello,
>
> A typical video chat application would contain some view finder code
> similar to
> the example in the Working Draft document:
>
> <p>To start chatting, select a video camera: <device type=media
> onchange="update(this.data)"></p>
> <video autoplay></video>
> <script>
> function update(stream) {
> document.getElementsByTagName('video')[0].src = stream.url; }
> </script>
>
> But assuming that the Stream is a combination of both audio and video
> media this is
> actually not what you want in a video chat, because you will also play
> back your own
> audio to yourself.
>
> To solve this in our implementation we defined two fragments, "audio"
> and "video",
> for the Stream url. The application then can address a specific media
> component
> in the Stream like this:
>
> document.getElementsByTagName('video')[0].src = stream.url + "#video";
>
> Is there some other way to solve this?
You could mute the video element with
document.getElementsByTagName('video')[0].muted = true; (although a
muted="" attribute is probably also going to be added so you can do <video
autoplay muted>).
> Anyone curiuos can find more information on what we have been
> experimenting with here:
> https://labs.ericsson.com/blog/beyond-html5-conversational-voice-and-video-implemented-webkit-gtk
>
> br
> Nicklas Sandgren
>
Cheers,
--
Simon Pieters
Opera Software
More information about the whatwg
mailing list