From 0029ee5c8a7a5684a92a33185ed25a40aef57eb7 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Sat, 17 Dec 2022 14:42:24 -0700 Subject: [PATCH] Add message about MSE on iOS --- web/src/routes/Camera.jsx | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/web/src/routes/Camera.jsx b/web/src/routes/Camera.jsx index abcda7d94..2b9a5e396 100644 --- a/web/src/routes/Camera.jsx +++ b/web/src/routes/Camera.jsx @@ -15,6 +15,7 @@ import { useApiHost } from '../api'; import useSWR from 'swr'; import WebRtcPlayer from '../components/WebRtcPlayer'; import MsePlayer from '../components/MsePlayer'; +import videojs from 'video.js'; const emptyObject = Object.freeze({}); @@ -98,13 +99,23 @@ export default function Camera({ camera }) { let player; if (viewMode === 'live') { if (viewSource == 'mse') { - player = ( - -
- -
-
- ); + if (videojs.browser.IS_IOS) { + player = ( + +
+ MSE is not supported on iOS devices. You'll need to use jsmpeg or webRTC. See the docs for more info. +
+
+ ); + } else { + player = ( + +
+ +
+
+ ); + } } else if (viewSource == 'webrtc') { player = (