- From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
- Date: Wed, 8 Jul 2015 07:06:50 +1000
- To: Jan-Ivar Bruaroey <jib@mozilla.com>
- Cc: public-media-capture@w3.org, Harald Alvestrand <harald@alvestrand.no>
- Message-ID: <CAHp8n2mB9-sHgsOt1efhg_Eu+BrK4nD0D84ZwEAaC5aOSY9-og@mail.gmail.com>
On 7 Jul 2015 6:52 am, "Jan-Ivar Bruaroey" <jib@mozilla.com> wrote:
>
> On 7/6/15 4:00 PM, Harald Alvestrand wrote:
>>
>> I am somewhat confused by one thing, though....
>>
>> If I do:
>>
>>
>> enumerateDevices() => { device: id = 12345 type = videoinput }
>>
>> getUserMedia({video: { deviceId: { exact: 12345 } }
>>
>> enumerateDevices()
>>
>> am I guaranteed that the device with id 12345 in the second
>> enumerateDevices is the same device as the one I grabbed?
>
>
> OK so we need to be clearer about what persisting means. I meant persist
(to disk) across browser sessions, leaving deviceIds stable "for the
current session", by which I meant browser session, i.e. until you quit the
browser.
I think it needs to persist longer than that. It should persist until the
OS can't associate it any longer.
Here's a use case: set up Google chrome in kiosk mode (e.g. for a kiosk at
an airport), run a video conference app on it that has two video cameras,
e.g. face & document. You only want to have to associate device ids once,
when you set up the hardware. Then store it to localStorage and reuse after
every reboot.
HTH.
Silvia.
>
>> I think it should be - that the getUserMedia() call has the effect of
>> freezing the previous ID assignment.
>
>
> so this would work regardless of the outcome of the gUM call (I'm
assuming you meant to wait for gUM to succeed?)
>
>
>> But on the other hand:
>>
>> enumerateDevices() => { device: id = 12345 type = videoinput }
>> enumerateDevices() => { device: id = 2346 type = videoinput }
>> getUserMedia({video: { deviceId: { exact: 12345 } }
>>
>> would result in a failure of getUserMedia. Right?
>
>
> No, as that's not what I had in mind with "current session".
>
> .: Jan-Ivar :.
>
>
Received on Tuesday, 7 July 2015 21:07:20 UTC