[webkit-changes] [WebKit/WebKit] 3b5080: Use stable_sort to sort media capture devices acco...

youennf noreply at github.com
Fri Apr 7 11:19:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3b5080a826eecd950ed4f81efba70352b9fe4b18
      https://github.com/WebKit/WebKit/commit/3b5080a826eecd950ed4f81efba70352b9fe4b18
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2023-04-07 (Fri, 07 Apr 2023)

  Changed paths:
    M Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp

  Log Message:
  -----------
  Use stable_sort to sort media capture devices according the fitness distance
https://bugs.webkit.org/show_bug.cgi?id=255131
rdar://problem/107735578

Reviewed by Eric Carlson.

Using stable_sort gives more predictive results since the initial order is the one we specify.
Also, it will favor higher priority devices (first in the list) against lower priority devices.

* Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::validateRequestConstraintsAfterEnumeration):

Canonical link: https://commits.webkit.org/262718@main




More information about the webkit-changes mailing list