feat: Add initial IPTV player with HLS.js and mpegts.js support for video playback and parent communication.

This commit is contained in:
Michael committed 2025-12-08 23:21:25 +01:00
1 parent 20f8904e78
commit 5a594bc70f
1 file changed
+8 -3
+8 -3
View File
@@ -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', () => {