WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
232155
[Cocoa] Fairplay encrypted video fails to play when loaded in a display:none element
https://bugs.webkit.org/show_bug.cgi?id=232155
Summary
[Cocoa] Fairplay encrypted video fails to play when loaded in a display:none ...
Eric Carlson
Reported
2021-10-22 10:14:35 PDT
Fairplay encrypted video can never play if it is loaded in a display:none element
Attachments
Patch
(12.95 KB, patch)
2021-10-22 10:24 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Patch
(13.85 KB, patch)
2021-10-22 16:08 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Patch
(13.83 KB, patch)
2021-10-22 16:33 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Patch
(13.83 KB, patch)
2021-10-22 16:35 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Eric Carlson
Comment 1
2021-10-22 10:14:50 PDT
rdar://83419159
Eric Carlson
Comment 2
2021-10-22 10:24:50 PDT
Created
attachment 442177
[details]
Patch
Jer Noble
Comment 3
2021-10-22 11:04:16 PDT
Comment on
attachment 442177
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=442177&action=review
> Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:112 > + if (!haveBeenAskedToPaint() || (supportsAcceleratedRendering() && m_player->renderingCanBeAccelerated())) > + return MediaRenderingMode::MediaRenderingToLayer;
So this will just cause us to always create an AVPlayerLayer immediately after the AVAssetStatus moves to > Unknown. Is that correct?
Peng Liu
Comment 4
2021-10-22 15:21:05 PDT
Comment on
attachment 442177
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=442177&action=review
> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:637 > + if (!m_avPlayer || m_videoLayer)
Just curious. Is it possible that we need a video layer with a different size (or content scale) than the existing video layer. Before this change, this function will always create a new video layer and set some parameters (from the player).
Eric Carlson
Comment 5
2021-10-22 15:56:37 PDT
Comment on
attachment 442177
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=442177&action=review
>> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:637 >> + if (!m_avPlayer || m_videoLayer) > > Just curious. Is it possible that we need a video layer with a different size (or content scale) than the existing video layer. > Before this change, this function will always create a new video layer and set some parameters (from the player).
No, this function is only called when `m_videoLayer` is NULL so this change isn't necessary.
Eric Carlson
Comment 6
2021-10-22 16:08:12 PDT
Created
attachment 442211
[details]
Patch
Jer Noble
Comment 7
2021-10-22 16:15:02 PDT
Comment on
attachment 442211
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=442211&action=review
r=me with nit
> Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:112 > > - if (supportsAcceleratedRendering() && m_player->renderingCanBeAccelerated()) > - return MediaRenderingToLayer; > + if ((m_readyState >= MediaPlayer::ReadyState::HaveMetadata && !haveBeenAskedToPaint()) || (supportsAcceleratedRendering() && m_player->renderingCanBeAccelerated())) > + return MediaRenderingMode::MediaRenderingToLayer;
Nit: I might break this out into two statements for readability, and a smaller diff: if (supportsAcceleratedRendering() && m_player->renderingCanBeAccelerated()) return MediaRenderingToLayer; if (m_readyState >= MediaPlayer::ReadyState::HaveMetadata && !haveBeenAskedToPaint()) return MediaRenderingToLayer;
Eric Carlson
Comment 8
2021-10-22 16:33:36 PDT
Created
attachment 442219
[details]
Patch
Eric Carlson
Comment 9
2021-10-22 16:35:59 PDT
Created
attachment 442221
[details]
Patch
EWS
Comment 10
2021-10-22 19:34:26 PDT
Committed
r284737
(
243446@main
): <
https://commits.webkit.org/243446@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 442221
[details]
.
Simon Fraser (smfr)
Comment 11
2021-10-22 20:17:25 PDT
Comment on
attachment 442221
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=442221&action=review
> Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:160 > + enum class MediaRenderingMode : uint8_t { > + MediaRenderingNone, > + MediaRenderingToContext, > + MediaRenderingToLayer > + };
Remove "MediaRendering" from the values.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug