From 5a594bc70fde3a791b04f60e465a89b6d19da96b Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Mon, 8 Dec 2025 23:21:25 +0100 Subject: [PATCH] feat: Add initial IPTV player with HLS.js and mpegts.js support for video playback and parent communication. --- web/player.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/web/player.html b/web/player.html index c106d2e..d3d7808 100644 --- a/web/player.html +++ b/web/player.html @@ -254,9 +254,9 @@ setTimeout(reportAudioTracks, 1000); // Wait a bit for tracks to parse }); - // Report user activity (mouse movement) to parent + // Report user activity (mouse movement or touch) to parent let lastActivityTime = 0; - document.addEventListener('mousemove', () => { + function reportActivity() { const now = Date.now(); if (now - lastActivityTime > 100) { // Throttle to 100ms lastActivityTime = now; @@ -264,7 +264,12 @@ type: 'user_activity' }, '*'); } - }); + } + document.addEventListener('mousemove', reportActivity); + document.addEventListener('touchstart', reportActivity); + document.addEventListener('touchmove', reportActivity); + document.addEventListener('click', reportActivity); + document.addEventListener('touchend', reportActivity); // Seek to startTime when video is ready video.addEventListener('loadedmetadata', () => {