From 2609a16a503d1d0da3356d1617a30dbbce4426f7 Mon Sep 17 00:00:00 2001 From: Wesley Luyten Date: Mon, 23 Jan 2023 08:14:16 -0600 Subject: [PATCH] fix: pointer hijacked by Vimeo iframe --- index.html | 62 ++++++++++++++++++++++++------------------ vimeo-video-element.js | 3 ++ 2 files changed, 39 insertions(+), 26 deletions(-) diff --git a/index.html b/index.html index 5f60ed0..d23fed2 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,6 @@ } media-controller:not([audio]) { display: block; /* expands the container if preload=none */ - max-width: 640px; /* allows the container to shrink if small */ aspect-ratio: 16 / 9; /* set container aspect ratio if preload=none */ width: 100%; } @@ -40,33 +39,15 @@

<vimeo-video>

-
- - - - - - -
- - - - - - - - - - - +
@@ -119,5 +100,34 @@

<vimeo-video>

console.log(e.type, video.videoWidth, video.videoHeight); }); + +
+ +

With Media Chrome

+ + + + + + + + + + + + + + + + + + +
+
+ diff --git a/vimeo-video-element.js b/vimeo-video-element.js index f350e59..ad5411b 100644 --- a/vimeo-video-element.js +++ b/vimeo-video-element.js @@ -17,6 +17,9 @@ templateShadowDOM.innerHTML = ` top: 0; left: 0; } + :host(:not([controls])) { + pointer-events: none; + } `;