W3C home > Mailing lists > Public > public-media-capture@w3.org > March 2012

Direct assignment of MediaStream to <video> (Re: PROPOSAL: Use events instead of callbacks)

From: Harald Alvestrand <harald@alvestrand.no>
Date: Wed, 14 Mar 2012 07:05:54 +0100
Message-ID: <4F603542.9060800@alvestrand.no>
To: Travis Leithead <travis.leithead@microsoft.com>
CC: Anant Narayanan <anant@mozilla.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>
On 03/13/2012 07:44 PM, Travis Leithead wrote:
>> -----Original Message-----
>> From: Anant Narayanan [mailto:anant@mozilla.com]
>>
>> As Adam correctly points out subsequently in the thread, chaining and
>> bubbling don't really make sense for getUserMedia. However, they do make
>> sense for a MediaStream (which could be attached to a<video>  or
>> <canvas>, and may want to bubble events back into the parent). Thus, if
>> we add events to MediaStream, I think there's a good case for having
>> them be real events. At that point, it's only a matter of consistency
>> for having getUserMedia behave in a similar manner.
> You don't attach a MediaStream to a<video>  or<canvas>. (Yes, I know Rich
> proposed the direct-assign technique, but I'm not in favor of that approach
> for a number of reasons.)
Forking the thread - do you care to share those reasons?

> Instead, you convert the MediaStream into a persistent
> in-memory URL via URL.createObjectURL. The result is a string. So, I'm really
> not sure I get the "bubble events back into the parent" concept. If there were
> to be such a thing, the event handlers would need to be defined on the
> <video>/<img>  tags themselves--having them on the MediaStream wouldn't do any
> good.
>
>> Thanks,
>> -Anant
>>
>
>
>
Received on Wednesday, 14 March 2012 06:06:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:09 UTC