Made video player controls state properly update when the video changes.

This commit is contained in:
Ajay Ramachandran 2019-07-28 18:48:28 -04:00
parent 2ff70f1511
commit 51a389284d

View file

@ -146,9 +146,12 @@ function videoIDChange(id) {
if (response != undefined) {
let sponsorTimes = response.sponsorTimes;
if (sponsorTimes != null && sponsorTimes.length > 0 && sponsorTimes[sponsorTimes.length - 1].length >= 2) {
document.getElementById("submitButton").style.display = "unset";
changeStartSponsorButton(true, true);
} else if (sponsorTimes != null && sponsorTimes.length > 0 && sponsorTimes[sponsorTimes.length - 1].length < 2) {
toggleStartSponsorButton();
changeStartSponsorButton(false, true);
} else {
changeStartSponsorButton(true, true);
document.getElementById("submitButton").style.display = "none";
}
}
});