mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-22 13:47:29 +02:00
Fix hls not loading video in explore (#19625)
This commit is contained in:
parent
d27e8c1bbf
commit
ec2543c23f
@ -1,4 +1,10 @@
|
||||
import React, { useState, useRef, useEffect, useCallback } from "react";
|
||||
import React, {
|
||||
useState,
|
||||
useRef,
|
||||
useEffect,
|
||||
useCallback,
|
||||
useMemo,
|
||||
} from "react";
|
||||
import { useVideoDimensions } from "@/hooks/use-video-dimensions";
|
||||
import HlsVideoPlayer from "./HlsVideoPlayer";
|
||||
import ActivityIndicator from "../indicators/activity-indicator";
|
||||
@ -89,6 +95,12 @@ export function GenericVideoPlayer({
|
||||
},
|
||||
);
|
||||
|
||||
const hlsSource = useMemo(() => {
|
||||
return {
|
||||
playlist: source,
|
||||
};
|
||||
}, [source]);
|
||||
|
||||
return (
|
||||
<div ref={containerRef} className="relative flex h-full w-full flex-col">
|
||||
<div className="relative flex flex-grow items-center justify-center">
|
||||
@ -107,9 +119,7 @@ export function GenericVideoPlayer({
|
||||
>
|
||||
<HlsVideoPlayer
|
||||
videoRef={videoRef}
|
||||
currentSource={{
|
||||
playlist: source,
|
||||
}}
|
||||
currentSource={hlsSource}
|
||||
hotKeys
|
||||
visible
|
||||
frigateControls={false}
|
||||
|
Loading…
Reference in New Issue
Block a user