Re: [Bug 24015] Add callback to indicate when available media devices change

On 2014-05-15 14:08, Praveen R Jadhav wrote:
> Yes, a callback/event to indication any new audio/video device
> availability should be good.

Then we agree - great!

>
> ------- *Original Message* -------
>
> *Sender* : Stefan Håkansson LK<stefan.lk.hakansson@ericsson.com>
>
> *Date* : May 15, 2014 16:42 (GMT+05:30)
>
> *Title* : Re: [Bug 24015] Add callback to indicate when available media
> devices change
>
> On 2014-05-12 07:29, Praveen R Jadhav wrote:
>  > Implementations like navigator.geolocation.watchPosition makes sense
>  > when there is a continuous update as in case of location
>  > co-ordinates(ex: travelling in a car). Also, these attributes have wide
>  > range of values.
>  >
>  > In case of WebRTC calls, you have limited no. of media input/output
>  > devices and they are either plugged or unplugged. Polling
>  > mechanism in this scenario will be a burden on overall system. Callback
>  > mechanism should be fine.
>
> I'm not sure what you mean - do you think adding a callback the way Dom
> proposes is a good idea?
>
>  >
>  > Regards,
>  >
>  > Praveen
>  >
>  > ------- *Original Message* -------
>  >
>  > *Sender* : Stefan Håkansson LK
>  >
>  > *Date* : May 10, 2014 13:24 (GMT+05:30)
>  >
>  > *Title* : Re: [Bug 24015] Add callback to indicate when available media
>  > devices change
>  >
>  > On 2014-05-09 18:08, Dominique Hazael-Massieux wrote:
>  >  > Le mercredi 18 décembre 2013 à 10:59 +0000, Stefan Håkansson LK a
> écrit
>  >  > (about
>  >  >
>  >
> http://dev.w3.org/2011/webrtc/editor/getusermedia.html#idl-def-MediaDeviceInfoCallback)
>  >  >
>  >  >>>> Agreed, but after actually working with the API I think that
>  >  >>> polling is clumsy;
>  >  >>> to get the behavior described below, you would have to poll the API
>  >  >>> about every
>  >  >>> second for the entire lifetime of the call.
>  >  >
>  >  >>> Agree: an event would be more efficient and cleaner to code than
>  >  >>> polling.
>  >  >
>  >  >> I agree, this would be much cleaner.
>  >  >
>  >  > https://www.w3.org/Bugs/Public/show_bug.cgi?id=24015 has a
> proposal for
>  >  > an event on navigator to avoid polling; I don't think that navigator
>  >  > implements the event listener interface, so it probably doesn't make
>  >  > sense to add it just for this.
>  >  >
>  >  > This could be moved to be a global event (i.e. on the window object);
>  >  > but I wonder if instead we could say that the MediaDeviceInfoCallback
>  >  > should be automatically invoked each time the list of media input and
>  >  > output devices change (roughly the same way navigator.watchPosition
>  >  > invokes its callback when the user position changes).
>  >  >
>  >  > Thoughts?
>  >
>  > I think following the pattern of watchPosition makes sense.
>  >
>  >  >
>  >  > Dom
>  >  >
>  >  >
>  >
>  >
>
>


Received on Thursday, 15 May 2014 12:22:56 UTC