mirror of
https://codeberg.org/ashley/poke
synced 2026-04-09 11:47:58 +00:00
fix stuff :3
This commit is contained in:
@@ -679,8 +679,6 @@ background-color: #0000;
|
||||
audio.pause();
|
||||
});
|
||||
|
||||
|
||||
|
||||
video.on('seeking', handleSeek);
|
||||
|
||||
video.on('seeked', () => {
|
||||
@@ -699,9 +697,22 @@ background-color: #0000;
|
||||
audio.pause();
|
||||
}
|
||||
});
|
||||
|
||||
// Initial synchronization
|
||||
const syncAtStart = () => {
|
||||
if (video.readyState() >= 3 && audio.readyState >= 3) { // Check if both video and audio are ready
|
||||
audio.currentTime = video.currentTime();
|
||||
video.play();
|
||||
audio.play();
|
||||
}
|
||||
};
|
||||
|
||||
video.on('canplay', syncAtStart);
|
||||
audio.addEventListener('canplay', syncAtStart);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<% if(dm) { %>
|
||||
|
||||
Reference in New Issue
Block a user