mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-09-26 19:41:29 +08:00
Reactify MSE player component (#9163)
* make mse a functional component with react hooks * iOS 17 fixes * birdseye mse * remove debug * fix test
This commit is contained in:

committed by
Blake Blackshear

parent
160e331035
commit
d2ab44ce72
@@ -9,10 +9,8 @@ import { Card, CardContent, CardHeader, CardTitle } from "../ui/card";
|
||||
import { Switch } from "../ui/switch";
|
||||
import { Label } from "../ui/label";
|
||||
import { usePersistence } from "@/hooks/use-persistence";
|
||||
// @ts-expect-error we know this does not have types
|
||||
import MSEPlayer from "@/lib/MsePlayer";
|
||||
import MSEPlayer from "./MsePlayer";
|
||||
import JSMpegPlayer from "./JSMpegPlayer";
|
||||
import { baseUrl } from "@/api/baseUrl";
|
||||
|
||||
const emptyObject = Object.freeze({});
|
||||
|
||||
@@ -68,16 +66,7 @@ export default function LivePlayer({
|
||||
if ("MediaSource" in window || "ManagedMediaSource" in window) {
|
||||
return (
|
||||
<div className="max-w-5xl">
|
||||
<MSEPlayer
|
||||
mode="mse"
|
||||
src={
|
||||
new URL(
|
||||
`${baseUrl.replace(/^http/, "ws")}live/webrtc/api/ws?src=${
|
||||
cameraConfig.live.stream_name
|
||||
}`
|
||||
)
|
||||
}
|
||||
/>
|
||||
<MSEPlayer camera={cameraConfig.live.stream_name} />
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user