From debd3779921953dc7cfc8412bee2f9638b49b7c8 Mon Sep 17 00:00:00 2001
From: Jan-Ivar Bruaroey Event summary
@@ -2834,8 +2833,9 @@ 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.
{{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,70 @@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 current result from + {{MediaDevices/enumerateDevices()}}. +
+dictionary DeviceChangeEventInit : EventInit { + sequence<MediaStream> streams = []; +};+
[]
+ + The {{devices}} member is an array of {{MediaDeviceInfo}} objects + representing the available devices. +
+The {{devices}} attribute returns an array of {{MediaDeviceInfo}} - objects representing the current result from - {{MediaDevices/enumerateDevices()}}. + objects representing the list of available devices at this time.