mirror of
https://github.com/immich-app/immich.git
synced 2025-03-01 15:11:21 +01:00
use visibility for motion videos
This commit is contained in:
parent
b0a2a6ac13
commit
6c8f7b7e6d
1 changed files with 20 additions and 17 deletions
|
@ -422,15 +422,8 @@ class NativeVideoViewerPage extends HookConsumerWidget {
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
|
||||||
return Stack(
|
final video = aspectRatio.value != null
|
||||||
children: [
|
? Center(
|
||||||
// This remains under the video to avoid flickering
|
|
||||||
// For motion videos, this is the image portion of the asset
|
|
||||||
image,
|
|
||||||
if (aspectRatio.value != null)
|
|
||||||
Visibility.maintain(
|
|
||||||
visible: asset.isVideo || showMotionVideo,
|
|
||||||
child: Center(
|
|
||||||
key: ValueKey(asset),
|
key: ValueKey(asset),
|
||||||
child: AspectRatio(
|
child: AspectRatio(
|
||||||
key: ValueKey(asset),
|
key: ValueKey(asset),
|
||||||
|
@ -442,8 +435,18 @@ class NativeVideoViewerPage extends HookConsumerWidget {
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
),
|
)
|
||||||
),
|
: null;
|
||||||
|
|
||||||
|
return Stack(
|
||||||
|
children: [
|
||||||
|
// This remains under the video to avoid flickering
|
||||||
|
// For motion videos, this is the image portion of the asset
|
||||||
|
image,
|
||||||
|
if (video != null)
|
||||||
|
asset.isVideo
|
||||||
|
? video
|
||||||
|
: Visibility.maintain(visible: showMotionVideo, child: video),
|
||||||
if (showControls) const Center(child: CustomVideoPlayerControls()),
|
if (showControls) const Center(child: CustomVideoPlayerControls()),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue