[webkit-reviews] review granted: [Bug 209941] Filter some capture device names : [Attachment 395327] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 3 01:29:41 PDT 2020


youenn fablet <youennf at gmail.com> has granted Eric Carlson
<eric.carlson at apple.com>'s request for review:
Bug 209941: Filter some capture device names
https://bugs.webkit.org/show_bug.cgi?id=209941

Attachment 395327: Patch

https://bugs.webkit.org/attachment.cgi?id=395327&action=review




--- Comment #3 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 395327
  --> https://bugs.webkit.org/attachment.cgi?id=395327
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=395327&action=review

> Source/WebCore/platform/mediastream/CaptureDevice.h:50
> +	   static NeverDestroyed<String>
airPods(MAKE_STATIC_STRING_IMPL("AirPods"));

This seems ok to special case AirPods name, I would restrict this to Microphone
DeviceType.
Maybe we should move that method to a CPP file as well.

Also we do not protect other device names.
We could sanitize all bluetooth microphone devices, by checking
kAudioDevicePropertyTransportType in CoreAudioCaptureDevice.cpp.
We would then continue special casing AirPods but would rename other BT
microphones to "Bluetooth Microphone" or "Bluetooth Microphone: xxx" with the
first letters of the real names.


More information about the webkit-reviews mailing list