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

Re: 答复: Can getUserMedia return multiple mediastreams?

From: Stefan Hakansson LK <stefan.lk.hakansson@ericsson.com>
Date: Mon, 4 Jun 2012 14:55:15 +0200
Message-ID: <4FCCB033.9080300@ericsson.com>
To: public-media-capture@w3.org
On 06/04/2012 03:18 AM, Sunyang (Eric) wrote:
> Hi Stefan
>
> Thanks for your reply
>
> Yes, I know we can construct MediaStream using existing MediaStreamTrack in other MediaStream.
> But from existing demo in internet, Ericsson webrtc browser, Google Chrome, it seems that we can only choose 1 camera at the same time.
> This is the first limitation.

I think that the Ericsson version allows you to tick all cameras that 
are available (while the Chrome selector allows the user to select one 
camera only per getUserMedia call).

>
> And getUserMedia only return 1 MediaStream, let's assume we can get 2 camera MediaStreamTrack in 1 stream, we need to execute extra step
> by construct MediaStream using existing MediaStreamTrack, what's more the 2 camera MediaStreamTrack are not needed to be synchronized(only
> synchronized MediaStreamTrack should be placed inside 1 MediaStream), 1 camera is for<video>  element rendering, another camera is for face detection/authorization etc..

I think more discussion is needed around this. Some time where spent at 
a resent telco, and I think there was a feeling that both models should 
be supported, but not really concluded or specced.

>
> What I am requesting is :
>
> Can we let getUserMedia optionally to return a MediaStreamList type value so that JS can iterate through the list and pick the right one for video element rendering, right one
> For face detection/authorization.
>
> MediaStream can contain quality information to help JS to judge which one to choose for different purpose?

I think the main objection to this has been fingerprinting: the more the 
app can find out about your device and its capabilities and so on the 
more privacy you give away.

>
> Yang
> -----邮件原件-----
> 发件人: Stefan Hakansson LK [mailto:stefan.lk.hakansson@ericsson.com]
> 发送时间: 2012年6月1日 20:26
> 收件人: public-media-capture@w3.org
> 主题: Re: Can getUserMedia return multiple mediastreams?
>
> I think it is not yet fully specified how many video tracks the stream
> generated by getUserMedia can contain, and this has been discussed a bit.
>
> However, there is always the possibility to create a new MediaStream,
> containing all the video tracks you want, from tracks in existing
> MediaStream's.
>
> Stefan
>
> On 06/01/2012 04:31 AM, Sunyang (Eric) wrote:
>> now there is navigator.getUserMedia() function for html5
>>
>> But JavaScript can only return 1 stream returned by getUserMedia can capture
>>
>> the stream by successCallback.
>>
>> For example:
>>
>> getUserMedia({video:true},successCallback,errorCallback)
>>
>> function successCallback(stream)
>>
>> {
>>
>> video.src = URL.createObjectURL(stream)
>>
>> }
>>
>> Now when we develop some face detection feature using html5, we have 2
>> or more
>>
>> camera connect to browser, but only by browser UI can we choose which
>> one camera
>>
>> can we use. We can not let JS to choose which camera can use, or use all
>> the cameras
>>
>> at the same time to manipulate the camera chosen for face detection.
>>
>> So, can we in future media capture draft let getUserMedia return
>> references for all available
>>
>> cameras connect to browser in a array, so we can iterate streams and let
>> JS to
>>
>> choose the one we want for later processing, Or in some 3D scenario, to
>>
>> manipulate multiple streams from cameras to show some 3D scene. for
>> example a
>>
>> better quality camera for face detection.
>>
>> And streams Array returned by getUserMedia can contain quality
>> information (1
>>
>> standard for 1 mega-pixel, 5 standard for mega-pixel )or optionally the
>>
>> description of the camera, so JS can choose by filtering or comparision.
>>
>> For example:
>>
>> getUserMedia({video:true},successCallback,errorCallback)
>>
>> function successCallback(MediaStreamList or MediaStream[] type etc)
>>
>> {
>>
>> while(i<MediStreamList.length)
>>
>> {
>>
>> if MediaStreamList(i).quality>5
>>
>> video.src=url.createObjectURL(MediaStreamList(i))
>>
>> break;
>>
>> ......
>>
>> }
>>
>> }
>>
>> Thanks a lot
>>
>> Expecting for feedback.
>>
>> ------------------------------------------------------------------------
>>
>> 孙扬
>> 华为技术有限公司Huawei Technologies Co., Ltd.
>> Company_logo
>>
>> Phone: +86 25 56622934
>> Fax: +86 25 56624081
>> Mobile: +86 13851889004
>> Email: eric.sun@huawei.com
>> 地址:南京市雨花区软件大道101号 华为南京基地 邮编:210012
>> Huawei Technologies Co., Ltd.
>> No 101,Software Avenue, Yuhua District,Nanjing 518129, P.R.China
>> http://www.huawei.com
>>
>> ------------------------------------------------------------------------
>>
>> 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或
>> 群组。禁
>> 止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)
>> 本邮件中
>> 的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
>> This e-mail and its attachments contain confidential information from
>> HUAWEI, which
>> is intended only for the person or entity whose address is listed above.
>> Any use of the
>> information contained herein in any way (including, but not limited to,
>> total or partial
>> disclosure, reproduction, or dissemination) by persons other than the
>> intended
>> recipient(s) is prohibited. If you receive this e-mail in error, please
>> notify the sender by
>> phone or email immediately and delete it!
>>
>
>
Received on Monday, 4 June 2012 12:55:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:24:35 UTC