mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-28 21:31:03 +00:00
fix: fixing hls videos
This commit is contained in:
@@ -23,7 +23,7 @@ export function useHlsVideo(
|
|||||||
const isHls = videoType === "application/x-mpegURL";
|
const isHls = videoType === "application/x-mpegURL";
|
||||||
|
|
||||||
if (!isHls) {
|
if (!isHls) {
|
||||||
return;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Hls.isSupported()) {
|
if (Hls.isSupported()) {
|
||||||
@@ -45,7 +45,7 @@ export function useHlsVideo(
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
hls.on(Hls.Events.ERROR, (event, data) => {
|
hls.on(Hls.Events.ERROR, (_event, data) => {
|
||||||
if (data.fatal) {
|
if (data.fatal) {
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
case Hls.ErrorTypes.NETWORK_ERROR:
|
case Hls.ErrorTypes.NETWORK_ERROR:
|
||||||
@@ -82,6 +82,7 @@ export function useHlsVideo(
|
|||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
logger.warn("HLS playback is not supported in this browser");
|
logger.warn("HLS playback is not supported in this browser");
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
}, [videoRef, videoSrc, videoType, autoplay, muted, loop]);
|
}, [videoRef, videoSrc, videoType, autoplay, muted, loop]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user