diff --git a/getusermedia.html b/getusermedia.html index eefa7b6a..ec0f658c 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -2649,11 +2649,10 @@
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 @@The {{devicechange}} event uses the {{DeviceChangeEvent}} interface.
+[Exposed=Window] +interface DeviceChangeEvent : Event { + constructor(DOMString type, DeviceChangeEventInit eventInitDict); + [SameObject] readonly attribute FrozenArray<MediaDeviceInfo> devices; +};+
Initialize [=this=].{{DeviceChangeEvent/devices}} to the + result of [=creating a frozen array=] from + eventInitDict.{{DeviceChangeEventInit/devices}}.
+The {{devices}} attribute returns an array of {{MediaDeviceInfo}} + objects representing the list of available devices at this time. +
+dictionary DeviceChangeEventInit : EventInit { + sequence<MediaStream> streams = []; +};+
[]
+ + The {{devices}} member is an array of {{MediaDeviceInfo}} objects + representing the available devices. +
+