/* PlaylistPlayer — fullscreen single-zone renderer for the Tizen player. * Mirrors the Android player's content rules: * image -> shown for duration_sec (min 3s), then advance * video -> plays to end then advance; single item loops * video/youtube-> iframe embed; single item loops, multi advances after duration * remote_url -> same as image/video but src = remote_url * widget -> iframe of {server}/api/widgets/{id}/render for duration_sec * Content file URL: {server}/api/content/{content_id}/file (public) */ // Minimal i18n for the Tizen player (no shared i18n module here). Falls back to en. var TIZEN_I18N = { en: { nothing_scheduled: 'Nothing scheduled right now', no_content: 'No content assigned yet', portrait_video_unsupported: 'Portrait video isn’t supported on this TV — use landscape, or pre-rotate the file and mark it Landscape.' }, es: { nothing_scheduled: 'No hay nada programado en este momento', no_content: 'Aún no hay contenido asignado', portrait_video_unsupported: 'El vídeo en vertical no es compatible con este televisor: usa horizontal o rota el archivo y márcalo como Horizontal.' }, fr: { nothing_scheduled: 'Rien de programmé pour le moment', no_content: 'Aucun contenu attribué pour l’instant', portrait_video_unsupported: 'La vidéo en portrait n’est pas prise en charge sur ce téléviseur — utilisez le paysage, ou faites pivoter le fichier et marquez-le Paysage.' }, de: { nothing_scheduled: 'Derzeit ist nichts geplant', no_content: 'Noch kein Inhalt zugewiesen', portrait_video_unsupported: 'Hochformat-Video wird auf diesem TV nicht unterstützt – nutze Querformat oder drehe die Datei und markiere sie als Querformat.' }, pt: { nothing_scheduled: 'Nada programado no momento', no_content: 'Nenhum conteúdo atribuído ainda', portrait_video_unsupported: 'Vídeo em retrato não é suportado nesta TV — use paisagem ou gire o arquivo e marque-o como Paisagem.' } }; var TZ_LANG = (function () { try { return (localStorage.getItem('rd_lang') || navigator.language || 'en').split('-')[0]; } catch (e) { return 'en'; } })(); function tzt(k) { return (TIZEN_I18N[TZ_LANG] && TIZEN_I18N[TZ_LANG][k]) || TIZEN_I18N.en[k] || k; } function PlaylistPlayer(stageEl, getBase) { this.stage = stageEl; this.getBase = getBase; this.items = []; this.index = 0; this.timer = null; this.sig = ''; this.timezone = null; // #74/#75: device-effective IANA tz for schedule eval this.wallFollower = false; // video-wall: a follower holds the leader's item, no auto-advance this.currentVideoEl = null; // current