From 05cd749b43e890db01f2659ab8433fded71de8c7 Mon Sep 17 00:00:00 2001
From: Jan-Ivar Bruaroey Let options be the method's first argument. Let deviceId be options Let p be a new promise. Run the following steps in parallel: If there is no audio output device, reject
p with a new If deviceId is not Let device be the device identified by deviceId. Resolve p with either deviceInfo.
Prompt the user to choose an audio output device, with a PermissionDescriptor
named This dictionary describe the options that can be used to obtain
+ access to an audio output device. When the value of this dictionary member is not Let device be the device identified by deviceId. Resolve p with either deviceInfo. Resolve p with either deviceInfo and abort all steps.
From 97f7bc749441215f5cd11f9abbf56190472d5fc3 Mon Sep 17 00:00:00 2001
From: Jan-Ivar Bruaroey Run the following steps in parallel: Let descriptor be a PermissionDescriptor named
+ If descriptor's
+ permission state is
+ Probe the User Agent for available audio output devices. If there is no audio output device, reject
p with a new If deviceId is not If deviceId is not
+ Let device be the device identified by deviceId. Let device be the device identified by
+ deviceId. Resolve p with either deviceId or a freshly
- rotated deviceId for device, and abort all steps. If device is available, resolve
+ p with either deviceId or a freshly
+ rotated deviceId for device, and abort the
+ in-parallel steps.
- Prompt the user to choose an audio output device, with a PermissionDescriptor
- named If the result of the request is "denied", reject
p with a new MediaDevices
Extensions
partial interface MediaDevices {
- Promise<MediaDeviceInfo> selectAudioOutput();
+ Promise<MediaDeviceInfo> selectAudioOutput(optional AudioOutputOptions options = {});
};
Methods
return a promise rejected with a DOMException
object whose
name
attribute has the value InvalidStateError
.
+ .deviceId
.Methods
DOMException
whose name
attribute
has the value NotFoundError
.""
, and
+ matches an id previously exposed by
+ selectAudioOutput
in an earlier browsing
+ session, the user agent MAY decide to run the following
+ sub steps:
+
+ "speaker-selection"
.Methods
AudioOutputOptions dictionary
+ dictionary AudioOutputOptions {
+ DOMString deviceId = "";
+};
+ Dictionary AudioOutputOptions Members
+
+
+ ""
""
,
+ and matches the id previously exposed by
+ selectAudioOutput
in an earlier session, the user
+ agent MAY opt to skip prompting the user in favor of resolving
+ with this id or a new rotated id for the same device, assuming
+ that device is currently available.Methods
Methods
+
"speaker-selection"
."denied"
, reject
+ p with a new DOMException
whose
+ name
attribute has the value
+ NotAllowedError
and abort these steps.DOMException
whose name
attribute
has the value NotFoundError
.""
, and
- matches an id previously exposed by
+ ""
and matches an id previously exposed by
selectAudioOutput
in an earlier browsing
- session, the user agent MAY decide to run the following
- sub steps:
"speaker-selection"
.DOMException
whose name
attribute
has the value NotAllowedError
and abort these steps.Methods
>"denied"
, reject
p with a new DOMException
whose
name
attribute has the value
- NotAllowedError
and abort these steps.
NotAllowedError
, and abort these steps.
Probe the User Agent for available audio output devices.
If there is no audio output device, reject
- p with a new DOMException
whose name
attribute
- has the value NotFoundError
.
If deviceId is not
+ If there is no audio output device, reject p
+ with a new DOMException
whose name
+ attribute has the value NotFoundError
and abort
+ these steps.
If deviceId is not
""
and matches an id previously exposed by
selectAudioOutput
in an earlier browsing
session, the user agent MAY decide, based on its previous
@@ -309,18 +312,18 @@
Let device be the device identified by - deviceId.
+ deviceId, if available.If device is available, resolve p with either deviceId or a freshly - rotated deviceId for device, and abort the + rotated device id for device, and abort the in-parallel steps.
Prompt the user to choose an audio output device, with descriptor.
If the result of the request is "denied", reject +
If the result of the request is "denied"
, reject
p with a new DOMException
whose name
attribute
has the value NotAllowedError
and abort these steps.
Let deviceInfo be a new MediaDeviceInfo
object to represent the selected audio output device.
""
When the value of this dictionary member is not ""
,
- and matches the id previously exposed by
+
When the value of this dictionary member
+ is not ""
, and matches the id previously exposed by
selectAudioOutput
in an earlier session, the user
agent MAY opt to skip prompting the user in favor of resolving
with this id or a new rotated id for the same device, assuming
that device is currently available.
Applications that wish to rely on user agents
+ supporting persisted device ids must pass these through
+ selectAudioOutput
successfully before they will
+ work with setSinkId
. The reason for this is that it
+ exposes fingerprinting information, but at the risk of prompting
+ the user if the device is not available or the user agent
+ decides not to honor the device id.
If descriptor's
- permission state is
This dictionary describe the options that can be used to obtain
+ This dictionary describes the options that can be used to obtain
access to an audio output device."denied"
, reject
From ae36d7807ba50fec6fd2b9d4c499cde491df44ac Mon Sep 17 00:00:00 2001
From: Jan-Ivar Bruaroey Methods
AudioOutputOptions dictionary
-