[webkit-reviews] review granted: [Bug 196555] [MediaStream] Host should be able to mute screen capture and camera/microphone independently : [Attachment 366722] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 4 11:13:03 PDT 2019
youenn fablet <youennf at gmail.com> has granted Eric Carlson
<eric.carlson at apple.com>'s request for review:
Bug 196555: [MediaStream] Host should be able to mute screen capture and
camera/microphone independently
https://bugs.webkit.org/show_bug.cgi?id=196555
Attachment 366722: Patch
https://bugs.webkit.org/attachment.cgi?id=366722&action=review
--- Comment #12 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 366722
--> https://bugs.webkit.org/attachment.cgi?id=366722
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=366722&action=review
> Source/WebCore/Modules/mediastream/MediaStream.cpp:120
> + setCaptureTracksMuted(document()->page()->mutedState());
Can probably remove these lines.
> Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:71
> + if (auto document = this->document()) {
This if check is probably not needed.
document() should return a valid pointer here anyway.
See also the document()->logger call.
As a future refactoring, we could make constructor take a Document& instead.
> Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:464
> + AtomicString eventType = muted() ? eventNames().muteEvent :
eventNames().unmuteEvent;
let's capture muted state in the lambda.
> Source/WebCore/testing/Internals.cpp:4062
> + state |= MediaProducer::ScreenCaptureIsMuted;
It would be nice to setPageMuted through testRunner and WebView API.
> Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:56
> + _WKMediaScreenCaptureMuted = 1 << 2,
s/ / /
> Source/WebKit/UIProcess/WebPageProxy.cpp:5344
> + bool hasMutedCaptureStreams = m_mediaState &
(WebCore::MediaProducer::MutedCaptureMask);
No need for ()
More information about the webkit-reviews
mailing list