Open
Description
Tried to see why Array.from(document.querySelectorAll('video'))
was returning videos for this extension, so I made some changes to make it work in manifest v3 and the query selector no longer finds videos in certain websites. Those in iframes to be specific. Which is odd since the setting: allFrames
is true. I was using this extension as a reference for my own where I need to find the playing video in any site, but ran into this one issue.
const videos = Array.from(document.querySelectorAll('video'))
.filter(video => video.readyState != 0)
.filter(video => video.disablePictureInPicture == false)
.sort((v1, v2) => {
const v1Rect = v1.getClientRects()[0] || {
width: 0,
height: 0
};
const v2Rect = v2.getClientRects()[0] || {
width: 0,
height: 0
};
return ((v2Rect.width * v2Rect.height) - (v1Rect.width * v1Rect.height));
});
Not really sure this can be fixed, but wanted to post it just for visibility. Now the real question is: was the chrome built in pip extension an actual chrome extension (and does it use v3?) or was it developed directly in the browser source code.
Metadata
Assignees
Labels
No labels
Activity