diff --git a/getusermedia.html b/getusermedia.html index 730ecd58..640e186b 100644 --- a/getusermedia.html +++ b/getusermedia.html @@ -3523,11 +3523,12 @@

Methods

requestedMediaTypes, run the following steps:

  1. -

    For each possible source for - media of type kind, - [=create a MediaStreamTrack=] with source - and the value false.

    -

    Call this set of tracks the +

    For each possible configuration of each possible + source device of media of type kind, conceive a + candidate as a placeholder for an eventual + {{MediaStreamTrack}} holding a source device and configured with a settings + dictionary comprised of its specific settings.

    +

    Call this set of candidates the candidateSet.

    If candidateSet is the empty set, [= reject =] p with a new @@ -3554,9 +3555,9 @@

    Methods

    these steps.

  2. Run the SelectSettings algorithm on each - track in candidateSet with CS + candidate in candidateSet with CS as the constraint set. If the algorithm returns - undefined, remove the track from + undefined, remove the candidate from candidateSet. This eliminates devices unable to satisfy the constraints, by verifying that at least one settings dictionary exists that @@ -3580,7 +3581,7 @@

    Methods

    candidate devices in candidateSet that are not attached to a live {{MediaStreamTrack}} in the current browsing context. Remove from - candidateSet any device for which the + candidateSet any candidate whose device's permission state is {{PermissionState/"denied"}}.

    If candidateSet is now empty, indicating that all devices of this type are in state @@ -3594,7 +3595,7 @@

    Methods

    Failure below.

  3. -

    Add all tracks from candidateSet to +

    Add all candidates from candidateSet to finalSet.

@@ -3633,13 +3634,12 @@

Methods

MUST disclose whether permission will be granted only to the device chosen, or to all devices of that kind.

-

Let track be the provided media, which - MUST be precisely one track of type kind from - finalSet. The decision of which track to +

Let finalCandidate be the provided media, which + MUST be precisely one candidate of type kind from + finalSet. The decision of which candidate to choose from the finalSet is completely up to the User Agent and may be determined by asking the user. - Once selected, the source of the - {{MediaStreamTrack}} MUST NOT change.

+

The User Agent SHOULD use the value of the computed fitness distance from the SelectSettings algorithm as an input to the selection algorithm. @@ -3677,7 +3677,10 @@

Methods

Otherwise, restart these sub steps with the updated finalSet.

  • -

    Using the granted device's deviceId, deviceId, set +

    Let grantedDevice be + finalCandidate's source device.

    +
  • +

    Using grantedDevice's deviceId, deviceId, set {{MediaDevices/[[devicesLiveMap]]}}[deviceId] to true, if it isn’t already true, and set the @@ -3685,6 +3688,12 @@

    Methods

    true, if it isn’t already true.

  • +
  • +

    Let track be the result of + [=create a MediaStreamTrack|creating a MediaStreamTrack=] + with grantedDevice and the value false for tieSourceToContext. + The source of the {{MediaStreamTrack}} MUST NOT change.

    +
  • Add track to stream's track set.