diff --git a/index.html b/index.html index 6ed209eb8..e41eb6e0e 100644 --- a/index.html +++ b/index.html @@ -21,6 +21,8 @@ + + diff --git a/src/assets/css/index.css b/src/assets/css/index.css index 092499bc4..d411a88d6 100644 --- a/src/assets/css/index.css +++ b/src/assets/css/index.css @@ -35,6 +35,10 @@ html[data-no-scroll], html[data-no-scroll] body { overflow: hidden; } +.top-content { + padding-top: calc(env(safe-area-inset-top) - 20px); +} + .roll { animation: roll 1s; } diff --git a/src/components/Icon.tsx b/src/components/Icon.tsx index dda27f5f1..4bd627a68 100644 --- a/src/components/Icon.tsx +++ b/src/components/Icon.tsx @@ -68,6 +68,8 @@ export enum Icons { BRUSH = "brush", UPLOAD = "upload", WEB = "web", + SHRINK = "shrink", + STRETCH = "stretch", } export interface IconProps { @@ -153,6 +155,8 @@ const iconList: Record = { `, + shrink: ``, + stretch: ``, }; function ChromeCastButton() { diff --git a/src/components/buttons/IosPwaLimitations.tsx b/src/components/buttons/IosPwaLimitations.tsx new file mode 100644 index 000000000..dc0ee9e7c --- /dev/null +++ b/src/components/buttons/IosPwaLimitations.tsx @@ -0,0 +1,23 @@ +/* eslint-disable no-alert */ +import { Icon, Icons } from "../Icon"; + +function IosPwaLimitations() { + const showAlert = () => { + alert( + "Due to Appleā€™s limitations, Picture-in-Picture (PiP) and Fullscreen are disabled on iOS PWAs. Use the browser vertion to re-enable these features.\n" + + "Tip: To hide the iOS home indicator, use guided access within the PWA!", + ); + }; + + return ( + + ); +} + +export default IosPwaLimitations; diff --git a/src/components/layout/Navigation.tsx b/src/components/layout/Navigation.tsx index 90e91e595..0abf62da5 100644 --- a/src/components/layout/Navigation.tsx +++ b/src/components/layout/Navigation.tsx @@ -47,14 +47,14 @@ export function Navigation(props: NavigationProps) { {/* backgrounds - these are seperate because of z-index issues */}
{ + const videoElement = document.getElementById("video-element"); + if (videoElement) { + videoElement.classList.toggle("object-cover"); + setIsWideScreen(!isWideScreen); + } + }} + /> + ); +} diff --git a/src/components/player/base/TopControls.tsx b/src/components/player/base/TopControls.tsx index a092d431a..8aa96002b 100644 --- a/src/components/player/base/TopControls.tsx +++ b/src/components/player/base/TopControls.tsx @@ -44,7 +44,7 @@ export function TopControls(props: { {props.children} diff --git a/src/components/player/internals/VideoContainer.tsx b/src/components/player/internals/VideoContainer.tsx index ee31d6d98..1147e2a25 100644 --- a/src/components/player/internals/VideoContainer.tsx +++ b/src/components/player/internals/VideoContainer.tsx @@ -101,6 +101,7 @@ function VideoElement() { return (
- {status === playerStatus.PLAYING ? : null} + {/* Disable PiP for iOS PWA */} + {!isIOSPWA && + (status === playerStatus.PLAYING ? : null)} {status === playerStatus.PLAYING ? : null} + {/* Expand button for iOS PWA only */} + {isIOSPWA && status === playerStatus.PLAYING && }
- + {/* Disable for iOS PWA */} + {!isIOSPWA && ( +
+ +
+ )} + {/* Add info for iOS PWA */} + {isIOSPWA && ( +
+ +
+ )}