W3C home > Mailing lists > Public > public-media-capture@w3.org > May 2014

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

From: Dominique Hazael-Massieux <dom@w3.org>
Date: Fri, 09 May 2014 18:08:10 +0200
Message-ID: <1399651690.19804.32.camel@cumulustier>
To: Stefan Håkansson LK <stefan.lk.hakansson@ericsson.com>
Cc: Sam Dutton <dutton@google.com>, "bugzilla@jessica.w3.org" <bugzilla@jessica.w3.org>, "public-media-capture@w3.org" <public-media-capture@w3.org>
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?

Dom
Received on Friday, 9 May 2014 16:08:31 UTC

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