1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add new media error types

This commit is contained in:
Bill Thornton 2024-03-08 20:26:01 -05:00
parent 081d408b18
commit 15d30ffaeb
5 changed files with 39 additions and 20 deletions

View file

@ -88,7 +88,7 @@ export function handleHlsJsMediaError(instance, reject) {
if (reject) {
reject();
} else {
onErrorInternal(instance, MediaError.MEDIA_DECODE_ERROR);
onErrorInternal(instance, MediaError.FATAL_HLS_ERROR);
}
}
}
@ -99,11 +99,7 @@ export function onErrorInternal(instance, type) {
instance.destroyCustomTrack(instance._mediaElement);
}
Events.trigger(instance, 'error', [
{
type: type
}
]);
Events.trigger(instance, 'error', [{ type }]);
}
export function isValidDuration(duration) {
@ -319,7 +315,7 @@ export function bindEventsToHlsPlayer(instance, hls, elem, onErrorFn, resolve, r
reject();
reject = null;
} else {
onErrorInternal(instance, MediaError.MEDIA_DECODE_ERROR);
onErrorInternal(instance, MediaError.FATAL_HLS_ERROR);
}
break;
}