Add plyr again as fallback

This commit is contained in:
2026-07-28 21:41:30 +02:00
parent eaf48276f0
commit 75b98de746
7 changed files with 589 additions and 43 deletions
@@ -8,6 +8,28 @@
@endif
<canvas id="ambientVideo" class="decoy"></canvas>
<div class="relative w-full aspect-[16/9]">
<div class="player-switcher" id="player-switcher">
<span class="player-switcher__label">Player</span>
<button type="button" class="player-switcher__btn" id="plyr-toggle-btn"
onclick="window.setPlayerPreference('plyr')" title="Switch to Plyr player">
<span class="player-switcher__dot"></span> Plyr
</button>
<button type="button" class="player-switcher__btn player-switcher__btn--active" id="hstream-toggle-btn"
onclick="window.setPlayerPreference('hstream')" title="Switch to HStream player">
<span class="player-switcher__dot"></span> HStream
</button>
</div>
<video id="player" playsinline crossorigin class="absolute inset-0 w-full h-full"></video>
</div>
<script>
(function() {
var pref = localStorage.getItem('hstreamPlayerPreference') || 'hstream';
var hstreamBtn = document.getElementById('hstream-toggle-btn');
var plyrBtn = document.getElementById('plyr-toggle-btn');
if (pref === 'plyr') {
hstreamBtn.classList.remove('player-switcher__btn--active');
plyrBtn.classList.add('player-switcher__btn--active');
}
})();
</script>
</div>