[webkit-reviews] review granted: [Bug 216299] [Cocoa] PERF: Don't instantiate AVPlayer-based audio decoders or renderers if an element is initially muted. : [Attachment 408366] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 9 14:57:39 PDT 2020
Eric Carlson <eric.carlson at apple.com> has granted Jer Noble
<jer.noble at apple.com>'s request for review:
Bug 216299: [Cocoa] PERF: Don't instantiate AVPlayer-based audio decoders or
renderers if an element is initially muted.
https://bugs.webkit.org/show_bug.cgi?id=216299
Attachment 408366: Patch
https://bugs.webkit.org/attachment.cgi?id=408366&action=review
--- Comment #4 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 408366
--> https://bugs.webkit.org/attachment.cgi?id=408366
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=408366&action=review
r=me once the bots are happy
>
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundati
onObjC.mm:946
> + m_avPlayer.get().suppressesAudioRendering = YES;
We should always know if an element is muted or not with the above changes, and
setMuted() will always be called if the muted state changes, so how about
something like `m_avPlayer.get().suppressesAudioRendering = m_muted`?
>
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundati
onObjC.mm:1334
> + if (!m_muted)
> + m_avPlayer.get().suppressesAudioRendering = NO;
setMuted(true) may be called before playback starts, so something like
`m_avPlayer.get().suppressesAudioRendering = m_muted` might be better.
More information about the webkit-reviews
mailing list