expanded for TV devices

This commit is contained in:
Simon
2026-02-09 12:38:49 +00:00
parent 1651e5a375
commit c2289bf3ec

View File

@@ -191,6 +191,11 @@ function isMobilePlayback() {
return window.matchMedia('(pointer: coarse)').matches && window.matchMedia('(max-width: 900px)').matches;
}
function isTvPlayback() {
const ua = navigator.userAgent || '';
return /SMART-TV|SmartTV|Smart TV|Internet\.TV|HbbTV|NetCast|Web0S|webOS|Tizen|AppleTV|Apple TV|GoogleTV|Android TV|AFTB|AFTS|AFTM|AFTT|AFTQ|AFTK|AFTN|AFTMM|AFTKR|Roku|DTV|BRAVIA|VIZIO|SHIELD|PhilipsTV|Hisense|VIDAA|TOSHIBA/i.test(ua);
}
function getMobileVideoHost() {
let host = document.getElementById('mobile-video-host');
if (!host) {
@@ -261,7 +266,7 @@ function showError(message) {
async function openPlayer(url) {
const modal = document.getElementById('video-modal');
const video = document.getElementById('player');
const useMobileFullscreen = isMobilePlayback();
const useMobileFullscreen = isMobilePlayback() || isTvPlayback();
let playbackStarted = false;
if (!playerHome) {