fix: ignore switchingVideos in Safari (see #1142)

This commit is contained in:
Albert Portnoy
2022-02-13 22:09:22 -06:00
parent a2a5d27900
commit 64d2c0a299

View File

@@ -879,7 +879,8 @@ function retryFetch(): void {
* Ex. When segments are first loaded * Ex. When segments are first loaded
*/ */
function startSkipScheduleCheckingForStartSponsors() { function startSkipScheduleCheckingForStartSponsors() {
if (!switchingVideos && sponsorTimes) { // switchingVideos is ignored in Safari due to event fire order. See #1142
if ((!switchingVideos || isSafari) && sponsorTimes) {
// See if there are any starting sponsors // See if there are any starting sponsors
let startingSegmentTime = getStartTimeFromUrl(document.URL) || -1; let startingSegmentTime = getStartTimeFromUrl(document.URL) || -1;
let found = false; let found = false;