feat(mobile): play motion video with long press gesture support (#6543)

This commit is contained in:
jzhangdev 2024-05-02 23:37:39 +08:00 committed by GitHub
parent 9bce3417e9
commit 42f03af2dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 52 additions and 0 deletions

View file

@ -331,6 +331,11 @@ class GalleryViewerPage extends HookConsumerWidget {
onTapDown: (_, __, ___) {
ref.read(showControlsProvider.notifier).toggle();
},
onLongPressStart: (_, __, ___) {
if (asset.livePhotoVideoId != null) {
isPlayingVideo.value = true;
}
},
imageProvider: provider,
heroAttributes: PhotoViewHeroAttributes(
tag: isFromDto