diff --git a/getusermedia.html b/getusermedia.html index eefa7b6a..ec0f658c 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -2649,11 +2649,10 @@

Event summary

devicechange - {{Event}} + {{DeviceChangeEvent}} The set of media devices, available to the [=User Agent=], has - changed. The current list devices can be retrieved with the - {{MediaDevices/enumerateDevices()}} - method. + changed. The current list of devices is available in the + {{DeviceChangeEvent/devices}} attribute. @@ -2834,8 +2833,9 @@

{{MediaDevices}}

deviceList.

  • -

    Queue a task that fires a simple event named devicechange at - mediaDevices.

    +

    Queue a task that [= fire an event | fires an event=] named {{devicechange}}, + using the {{DeviceChangeEvent}} constructor with {{DeviceChangeEventInit/devices}} + initialized to newExposedDevices, at mediaDevices.

    The [=User Agent=] MAY combine firing multiple events into firing one event when several events are due or when multiple devices are added or removed at the same time, e.g. a camera with a microphone.

    @@ -3424,6 +3424,69 @@

    Methods

    +
    +

    {{DeviceChangeEvent}}

    +

    The {{devicechange}} event uses the {{DeviceChangeEvent}} interface.

    +
    +
    [Exposed=Window]
    +interface DeviceChangeEvent : Event {
    +  constructor(DOMString type, DeviceChangeEventInit eventInitDict);
    +  [SameObject] readonly attribute FrozenArray<MediaDeviceInfo> devices;
    +};
    +
    +

    Constructors

    +
    +
    constructor()
    +
    +

    Initialize [=this=].{{DeviceChangeEvent/devices}} to the + result of [=creating a frozen array=] from + eventInitDict.{{DeviceChangeEventInit/devices}}.

    +
    +
    +
    +
    +

    Attributes

    +
    +
    + devices of type FrozenArray<{{MediaDeviceInfo}}>, + readonly +
    +
    +

    The {{devices}} attribute returns an array of {{MediaDeviceInfo}} + objects representing the list of available devices at this time. +

    +
    +
    +
    +
    +
    +
    dictionary DeviceChangeEventInit : EventInit {
    +  sequence<MediaStream> streams = [];
    +};
    +
    +

    Dictionary DeviceChangeEventInit Members

    +
    +
    + devices of type sequence<{{MediaDeviceInfo}}>, + defaulting to [] +
    +
    +

    + The {{devices}} member is an array of {{MediaDeviceInfo}} objects + representing the available devices. +

    +
    +
    +
    +
    +

    Obtaining local multimedia content