Re: First draft available

Rich Tibbett wrote:
> Robin Berjon wrote:
>> var um = navigator.getUserMedia(options);
>> um.onsuccess = function (stream) { ... };
>> um.onerror = function (err) { ... };
>> um.start();
>>
>
> This doesn't work. If the web page does not register a success callback
> then we don't want to go through any user authorization process for
> accessing the camera. When the success callback is a non-optional inline
> as in the current proposal then we get that assurance.
>
>> Or the Node-style compound callback:
>>
>> navigator.getUserMedia(options, function (err, stream) {...});
>
> We (Opera) have done a fair amount of implementation work, tutorials,
> public speaking and developer evangelism around the existing mechanism.
> This is also published in technical books you can find on current book
> shelves [1].
>
> I'm not really sure this change would be worth it, considering the
> following example basically does exactly the same thing:
>
> navigator.getUserMedia(options, handle, handle);
> function handle(callback) {
> if(callback.code) return someErr;
> // process as a success callback
> }
>
> - Rich


[1] 
http://books.google.com/books?id=a8HQCk4pbQkC&lpg=PT177&ots=3d14e6gsIB&pg=PT177#v=onepage&q&f=false 
(http://introducinghtml5.com/)

Also see:

http://dev.opera.com/articles/view/labs-more-fun-using-the-web-with-getusermedia-and-native-pages/

http://dev.opera.com/articles/view/playing-with-html5-video-and-getusermedia-support/

http://my.opera.com/desktopteam/blog/2011/10/19/new-opera-labs-release-with-getusermedia-and-opera-reader

Received on Thursday, 1 December 2011 11:28:16 UTC