Prevent negative timeouts in player
This commit is contained in:
parent
9019377d0e
commit
c0bd28f6d5
|
@ -273,6 +273,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Preventative code if the local and remote clocks are out of sync.
|
||||||
|
if (time_to_next_track_starts < 0) {
|
||||||
|
time_to_next_track_starts = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Add 3 seconds to the timeout so Airtime has time to update the metadata before we fetch it
|
// Add 3 seconds to the timeout so Airtime has time to update the metadata before we fetch it
|
||||||
metadataTimer = setTimeout(attachStreamMetadataToPlayer, time_to_next_track_starts+3000);
|
metadataTimer = setTimeout(attachStreamMetadataToPlayer, time_to_next_track_starts+3000);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue