mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-11 17:29:26 +02:00
feat: Add initial IPTV player with HLS.js and mpegts.js support for video playback and parent communication.
This commit is contained in:
1 parent
20f8904e78
commit
5a594bc70f
1 file changed
+8
-3
+8
-3
@@ -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', () => {
|
||||
|
||||
Reference in new issue
Block a user