Add a visible error when trying to load a time range with no video content

pull/248/head
ElementalAlchemist 3 years ago committed by Mike Lang
parent 4fb8548aba
commit d20f37266f

@ -80,8 +80,14 @@ async function loadVideoPlayer(playlistURL) {
if (data.fatal) {
switch (data.type) {
case Hls.ErrorTypes.NETWORK_ERROR:
console.log("A fatal network error occurred; retrying", data);
globalPlayer.startLoad();
if (data.reason === "no level found in manifest") {
addError(
"There is no video data between the specified start and end times. Change the times so that there is video content to play."
);
} else {
console.log("A fatal network error occurred; retrying", data);
globalPlayer.startLoad();
}
break;
case Hls.ErrorTypes.MEDIA_ERROR:
console.log("A fatal media error occurred; retrying", data);

Loading…
Cancel
Save