Merge pull request #572 from ajayyy/video-speed

Listen to custom videospeed event
This commit is contained in:
Ajay Ramachandran 2020-12-14 22:32:03 -05:00 committed by GitHub
commit ae6130259b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -589,6 +589,8 @@ async function sponsorsLookup(id: string) {
}
});
video.addEventListener('ratechange', () => startSponsorSchedule());
// Used by videospeed extension (https://github.com/igrigorik/videospeed/pull/740)
video.addEventListener('videoSpeed_ratechange', () => startSponsorSchedule());
video.addEventListener('pause', () => {
// Reset lastCheckVideoTime
lastCheckVideoTime = -1;