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