Listen to custom videospeed event

https://github.com/igrigorik/videospeed/pull/740
This commit is contained in:
Ajay Ramachandran 2020-12-14 22:26:27 -05:00
parent dbee744bd7
commit bd51f5b621

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;