mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-07 11:45:24 +03:00
iOS 17 fixes
This commit is contained in:
parent
ed4bd89cd6
commit
53292d9d0c
@ -208,7 +208,12 @@ function MSEPlayer({ src }: MSEPlayerProps) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
msRef.current = new MediaSource();
|
// iOS 17.1+ uses ManagedMediaSource
|
||||||
|
const MediaSourceConstructor =
|
||||||
|
"ManagedMediaSource" in window ? window.ManagedMediaSource : MediaSource;
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
msRef.current = new MediaSourceConstructor();
|
||||||
|
|
||||||
if ("hidden" in document && visibilityCheck) {
|
if ("hidden" in document && visibilityCheck) {
|
||||||
document.addEventListener("visibilitychange", () => {
|
document.addEventListener("visibilitychange", () => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user