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:
parent
d5b23373c7
commit
dd638ac207
2 changed files with 7 additions and 2 deletions
5
web/src/app.d.ts
vendored
5
web/src/app.d.ts
vendored
|
@ -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>;
|
||||
}
|
||||
|
|
|
@ -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)}
|
||||
|
|
Loading…
Reference in a new issue