New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No videos play if opened in full screen on first play #12422
No videos play if opened in full screen on first play #12422
Conversation
EWS run on previous version of this PR (hash 2c4b031) |
2c4b031
to
977c100
Compare
EWS run on previous version of this PR (hash 977c100) |
@@ -190,6 +192,7 @@ class VideoFullscreenManager : public RefCounted<VideoFullscreenManager>, privat | |||
HashMap<PlaybackSessionContextIdentifier, int> m_clientCounts; | |||
WeakPtr<WebCore::HTMLVideoElement, WebCore::WeakPtrImplWithEventTargetData> m_videoElementInPictureInPicture; | |||
bool m_currentlyInFullscreen { false }; | |||
WTF::Function<void(LayerHostingContextID)> m_setupFullscreen; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I'm not wild about this name, maybe m_setupFullscreenHandler
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in latest patch.
Thanks for reviewing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo in the commit log:
s/guranteed/guaranteed
some comments
@@ -190,6 +192,7 @@ class VideoFullscreenManager : public RefCounted<VideoFullscreenManager>, privat | |||
HashMap<PlaybackSessionContextIdentifier, int> m_clientCounts; | |||
WeakPtr<WebCore::HTMLVideoElement, WebCore::WeakPtrImplWithEventTargetData> m_videoElementInPictureInPicture; | |||
bool m_currentlyInFullscreen { false }; | |||
WTF::Function<void(LayerHostingContextID)> m_setupFullscreen; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be a CompletionHandler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be a CompletionHandler?
Yes, I think it could. I have kept is as Function, though, since I think both make sense in this context.
|
||
if (m_setupFullscreen) { | ||
auto [model, interface] = ensureModelAndInterface(contextId); | ||
RefPtr<HTMLVideoElement> videoElement = model->videoElement(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto videoElement
need null check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Fixed in latest patch.
Thanks for reviewing!
977c100
to
413c282
Compare
EWS run on previous version of this PR (hash 413c282) |
413c282
to
ab15958
Compare
EWS run on previous version of this PR (hash ab15958) |
ab15958
to
4c6e1cb
Compare
EWS run on current version of this PR (hash 4c6e1cb) |
https://bugs.webkit.org/show_bug.cgi?id=255048 rdar://107540521 Reviewed by Eric Carlson and Jean-Yves Avenard. When CA layers are not remotely hosted in both the GPU process and the WebContent process, it is not guaranteed that the remote context ID will be set in the HTML media element when entering fullscreen. This patch works around that by delaying setting up the fullscreen until the video dimensions are set. At this point, the remote context ID should be available. * Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.h: * Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm: (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement): (WebKit::VideoFullscreenManager::videoDimensionsChanged): Canonical link: https://commits.webkit.org/262654@main
4c6e1cb
to
62b9ab7
Compare
Committed 262654@main (62b9ab7): https://commits.webkit.org/262654@main Reviewed commits have been landed. Closing PR #12422 and removing active labels. |
62b9ab7
4c6e1cb
π§ͺ mac-AS-debug-wk2