1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 22:51:59 +00:00

fix(web): slideshow on iphone (#11599)

* fix(web): slideshow on iphone

* make requestFullscreen type optional
This commit is contained in:
Michel Heusschen 2024-08-06 15:34:17 +02:00 committed by GitHub
parent d5b23373c7
commit dd638ac207
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

5
web/src/app.d.ts vendored
View file

@ -22,3 +22,8 @@ declare module '$env/static/public' {
export const PUBLIC_IMMICH_PAY_HOST: string;
export const PUBLIC_IMMICH_BUY_HOST: string;
}
interface Element {
// Make optional, because it's unavailable on iPhones.
requestFullscreen?(options?: FullscreenOptions): Promise<void>;
}

View file

@ -334,7 +334,7 @@
const handlePlaySlideshow = async () => {
try {
await assetViewerHtmlElement.requestFullscreen();
await assetViewerHtmlElement.requestFullscreen?.();
} catch (error) {
handleError(error, $t('errors.unable_to_enter_fullscreen'));
$slideshowState = SlideshowState.StopSlideshow;
@ -422,7 +422,7 @@
<div class="z-[1000] absolute w-full flex">
<SlideshowBar
{isFullScreen}
onSetToFullScreen={() => assetViewerHtmlElement.requestFullscreen()}
onSetToFullScreen={() => assetViewerHtmlElement.requestFullscreen?.()}
onPrevious={() => navigateAsset('previous')}
onNext={() => navigateAsset('next')}
onClose={() => ($slideshowState = SlideshowState.StopSlideshow)}