[Modern Media Controls] Controls are not visible in fullscreen without the controls...
[WebKit-https.git] / Source / WebCore / Modules / modern-media-controls / media / controls-visibility-support.js
index a0de056..e0d25e0 100644 (file)
@@ -45,7 +45,7 @@ class ControlsVisibilitySupport extends MediaControllerSupport
 
     get mediaEvents()
     {
-        return ["loadedmetadata", "play", "pause"];
+        return ["loadedmetadata", "play", "pause", "webkitfullscreenchange"];
     }
 
     get tracksToMonitor()
@@ -64,7 +64,7 @@ class ControlsVisibilitySupport extends MediaControllerSupport
     {
         const media = this.mediaController.media;
         const host = this.mediaController.host;
-        const shouldShowControls = !!(media.controls || (host && host.shouldForceControlsDisplay));
+        const shouldShowControls = !!(media.controls || (host && host.shouldForceControlsDisplay) || media.webkitDisplayingFullscreen);
         const isVideo = media instanceof HTMLVideoElement && media.videoTracks.length > 0;
 
         const controls = this.mediaController.controls;