Add message about MSE on iOS

This commit is contained in:
Nick Mowen 2022-12-17 14:42:24 -07:00
parent f90053b28c
commit 0029ee5c8a

View File

@ -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,6 +99,15 @@ export default function Camera({ camera }) {
let player;
if (viewMode === 'live') {
if (viewSource == 'mse') {
if (videojs.browser.IS_IOS) {
player = (
<Fragment>
<div className="w-5xl text-center text-sm">
MSE is not supported on iOS devices. You'll need to use jsmpeg or webRTC. See the docs for more info.
</div>
</Fragment>
);
} else {
player = (
<Fragment>
<div className="max-w-5xl">
@ -105,6 +115,7 @@ export default function Camera({ camera }) {
</div>
</Fragment>
);
}
} else if (viewSource == 'webrtc') {
player = (
<Fragment>