mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-22 08:56:36 +00:00
fix(extension): harden player discovery for Crunchyroll
This commit is contained in:
@@ -13,6 +13,7 @@ const SCENARIOS = [
|
||||
{ page: 'nested-frame.html', expected: 'framed-player', what: 'a player two frame levels down' },
|
||||
{ page: 'shadow-player.html', expected: 'shadow-player', what: 'a player inside a shadow root over a light-DOM teaser' },
|
||||
{ page: 'muted-player.html', expected: 'player', what: 'the only player even when muted' },
|
||||
{ page: 'display-contents-player.html', expected: 'player', what: 'a visible player inside a boxless display-contents wrapper' },
|
||||
{ page: 'hidden-preload.html', expected: 'player', what: 'the visible player over a hidden higher-resolution preload' },
|
||||
{ page: 'ad-frame.html', expected: 'player', what: 'the real player over a muted ad in a first-party frame' },
|
||||
{ page: 'background-loop.html', expected: 'player', what: 'the real player over a large looping background video' },
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Display contents player</title>
|
||||
<h1>Visible player inside a boxless wrapper</h1>
|
||||
<div id="app-contents" style="display: contents">
|
||||
<div class="video-player-wrapper">
|
||||
<video id="player" data-expected width="854" height="480" src="../media/player-480p-12s.mp4"></video>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const wrapper = document.getElementById('app-contents');
|
||||
if (wrapper.checkVisibility() !== false || wrapper.getBoundingClientRect().width !== 0) {
|
||||
throw new Error('display: contents fixture must expose a boxless wrapper');
|
||||
}
|
||||
</script>
|
||||
<script src="ready.js"></script>
|
||||
Reference in New Issue
Block a user