|
|
@ -78,12 +78,20 @@ window.addEventListener("DOMContentLoaded", async (event) => {
|
|
|
|
rangesData.push({ start: rangeStartTime, end: rangeEndTime });
|
|
|
|
rangesData.push({ start: rangeStartTime, end: rangeEndTime });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const videoElement = document.getElementById("video");
|
|
|
|
|
|
|
|
const currentVideoPosition = dateTimeFromVideoPlayerTime(videoElement.currentTime);
|
|
|
|
|
|
|
|
|
|
|
|
globalStartTimeString = wubloaderTimeFromDateTime(newStart);
|
|
|
|
globalStartTimeString = wubloaderTimeFromDateTime(newStart);
|
|
|
|
globalEndTimeString = wubloaderTimeFromDateTime(newEnd);
|
|
|
|
globalEndTimeString = wubloaderTimeFromDateTime(newEnd);
|
|
|
|
|
|
|
|
|
|
|
|
updateSegmentPlaylist();
|
|
|
|
updateSegmentPlaylist();
|
|
|
|
|
|
|
|
|
|
|
|
globalPlayer.once(Hls.Events.LEVEL_LOADED, (_data) => {
|
|
|
|
globalPlayer.once(Hls.Events.LEVEL_LOADED, (_data) => {
|
|
|
|
|
|
|
|
const newVideoPosition = videoPlayerTimeFromDateTime(currentVideoPosition);
|
|
|
|
|
|
|
|
if (newVideoPosition !== null) {
|
|
|
|
|
|
|
|
videoElement.currentTime = newVideoPosition;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let rangeErrorCount = 0;
|
|
|
|
let rangeErrorCount = 0;
|
|
|
|
for (const [rangeIndex, rangeData] of rangesData.entries()) {
|
|
|
|
for (const [rangeIndex, rangeData] of rangesData.entries()) {
|
|
|
|
const rangeContainer = rangeDefinitionsElements[rangeIndex];
|
|
|
|
const rangeContainer = rangeDefinitionsElements[rangeIndex];
|
|
|
|