Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 1655083002: Enable SurfaceView fullscreen video on Android with WebMediaPlayerImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@avda-sv
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 7a3c5bb811ac9c53744959f8ea10062c0685cee2..9f41e2b5b6e7f6ec88fa14b27fde711e54343686 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -3104,8 +3104,11 @@ void HTMLMediaElement::didBecomeFullscreenElement()
mediaControls()->enteredFullscreen();
// Cache this in case the player is destroyed before leaving fullscreen.
m_inOverlayFullscreenVideo = usesOverlayFullscreenVideo();
- if (m_inOverlayFullscreenVideo)
+ if (m_inOverlayFullscreenVideo) {
document().layoutView()->compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree);
+ } else if (webMediaPlayer()) {
+ webMediaPlayer()->enterFullscreen();
+ }
}
void HTMLMediaElement::willStopBeingFullscreenElement()
@@ -3115,6 +3118,8 @@ void HTMLMediaElement::willStopBeingFullscreenElement()
if (m_inOverlayFullscreenVideo)
document().layoutView()->compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree);
m_inOverlayFullscreenVideo = false;
+ if (webMediaPlayer())
+ webMediaPlayer()->exitedFullscreen();
}
WebLayer* HTMLMediaElement::platformLayer() const

Powered by Google App Engine
This is Rietveld 408576698