mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2024-11-14 04:17:29 +00:00
Synchronise video/audio playback rate
This commit is contained in:
parent
431767437d
commit
cbedc46c9b
@ -135,7 +135,7 @@ function playbackIntervention(event) {
|
||||
other.currentTime = target.currentTime;
|
||||
break;
|
||||
case "ratechange":
|
||||
other.rate = target.rate;
|
||||
other.playbackRate = target.playbackRate;
|
||||
break;
|
||||
// case "stalled":
|
||||
// case "waiting":
|
||||
@ -151,7 +151,7 @@ function playbackIntervention(event) {
|
||||
for (let eventName of ["pause", "play", "seeked"]) {
|
||||
video.addEventListener(eventName, playbackIntervention)
|
||||
}
|
||||
for (let eventName of ["canplaythrough", "waiting", "stalled"]) {
|
||||
for (let eventName of ["canplaythrough", "waiting", "stalled", "ratechange"]) {
|
||||
video.addEventListener(eventName, playbackIntervention)
|
||||
audio.addEventListener(eventName, playbackIntervention)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user