Skip to content

Commit

Permalink
fix: disable fullscreen on ios
Browse files Browse the repository at this point in the history
  • Loading branch information
davwheat committed Jun 8, 2024
1 parent cba6be1 commit 2f391b8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/AmeyLiveTrainAnnouncements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,14 @@ export function LiveTrainAnnouncements<SystemKeys extends string>({
css={{
marginBottom: 16,
}}
onClick={() => setFullscreen(true)}
onClick={() => {
// Is iPhone
if (navigator.userAgent.match(/iPhone/i)) {
alert('iPhones do not support the Fullscreen API. Please use a different device to use this feature.')
} else {
setFullscreen(true)
}
}}
>
<span className="buttonLabel">
<FullscreenIcon /> Fullscreen
Expand Down

0 comments on commit 2f391b8

Please sign in to comment.