mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 08:58:13 +01:00
gwa gwa
This commit is contained in:
parent
8dfaf532d8
commit
a617d8e887
1 changed files with 78 additions and 89 deletions
|
@ -679,6 +679,8 @@ background-color: #0000;
|
|||
audio.pause();
|
||||
});
|
||||
|
||||
|
||||
|
||||
video.on('seeking', handleSeek);
|
||||
|
||||
video.on('seeked', () => {
|
||||
|
@ -697,22 +699,9 @@ 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) { %>
|
||||
|
|
Loading…
Reference in a new issue