forked from Github/frigate
Add exports message and default to webrtc on < iOS 17.1 (#12281)
This commit is contained in:
@@ -81,6 +81,10 @@ export default function DraggableGridLayout({
|
||||
|
||||
useEffect(() => {
|
||||
if (!cameras) return;
|
||||
|
||||
const mseSupported =
|
||||
"MediaSource" in window || "ManagedMediaSource" in window;
|
||||
|
||||
const newPreferredLiveModes = cameras.reduce(
|
||||
(acc, camera) => {
|
||||
const isRestreamed =
|
||||
@@ -89,7 +93,11 @@ export default function DraggableGridLayout({
|
||||
camera.live.stream_name,
|
||||
);
|
||||
|
||||
acc[camera.name] = isRestreamed ? "mse" : "jsmpeg";
|
||||
if (!mseSupported) {
|
||||
acc[camera.name] = isRestreamed ? "webrtc" : "jsmpeg";
|
||||
} else {
|
||||
acc[camera.name] = isRestreamed ? "mse" : "jsmpeg";
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{} as { [key: string]: LivePlayerMode },
|
||||
|
||||
@@ -96,7 +96,10 @@ export default function LiveBirdseyeView({
|
||||
return "jsmpeg";
|
||||
}
|
||||
|
||||
if (isSafari) {
|
||||
if (
|
||||
isSafari ||
|
||||
!("MediaSource" in window || "ManagedMediaSource" in window)
|
||||
) {
|
||||
return "webrtc";
|
||||
}
|
||||
|
||||
|
||||
@@ -222,6 +222,10 @@ export default function LiveCameraView({
|
||||
return "jsmpeg";
|
||||
}
|
||||
|
||||
if (!("MediaSource" in window || "ManagedMediaSource" in window)) {
|
||||
return "webrtc";
|
||||
}
|
||||
|
||||
return "mse";
|
||||
}, [lowBandwidth, mic, webRTC, isRestreamed]);
|
||||
|
||||
|
||||
@@ -112,6 +112,10 @@ export default function LiveDashboardView({
|
||||
|
||||
useEffect(() => {
|
||||
if (!cameras) return;
|
||||
|
||||
const mseSupported =
|
||||
"MediaSource" in window || "ManagedMediaSource" in window;
|
||||
|
||||
const newPreferredLiveModes = cameras.reduce(
|
||||
(acc, camera) => {
|
||||
const isRestreamed =
|
||||
@@ -120,7 +124,11 @@ export default function LiveDashboardView({
|
||||
camera.live.stream_name,
|
||||
);
|
||||
|
||||
acc[camera.name] = isRestreamed ? "mse" : "jsmpeg";
|
||||
if (!mseSupported) {
|
||||
acc[camera.name] = isRestreamed ? "webrtc" : "jsmpeg";
|
||||
} else {
|
||||
acc[camera.name] = isRestreamed ? "mse" : "jsmpeg";
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{} as { [key: string]: LivePlayerMode },
|
||||
|
||||
Reference in New Issue
Block a user