Improved zero second skipping for directly loaded videos

This commit is contained in:
Ajay Ramachandran
2020-03-30 14:07:35 -04:00
parent 7f36c7eec3
commit e62d46f2dd

View File

@@ -259,8 +259,13 @@ function resetValues() {
//reset sponsor data found check
sponsorDataFound = false;
if (switchingVideos === null) {
// When first loading a video, it is not switching videos
switchingVideos = false;
} else {
switchingVideos = true;
}
}
async function videoIDChange(id) {
//if the id has not changed return
@@ -588,7 +593,7 @@ function sponsorsLookup(id: string, channelIDPromise?) {
UUIDs = smallUUIDs;
}
if (!video.paused && !switchingVideos) {
if (!switchingVideos) {
// See if there are any starting sponsors
let startingSponsor: number = -1;
for (const time of sponsorTimes) {