From 4b3855ab28412fc0ffa9861ebbd07ea8e2d2eb68 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Wed, 11 Aug 2021 00:17:37 +0200 Subject: [PATCH] Fixed #135 --- package.json | 2 +- .../Timeline/Shared/Attachment/Video.tsx | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index e26c7b54..1bf34b16 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "native": "210511", "major": 2, "minor": 1, - "patch": 1, + "patch": 2, "expo": "41.0.0" }, "description": "tooot app for Mastodon", diff --git a/src/components/Timeline/Shared/Attachment/Video.tsx b/src/components/Timeline/Shared/Attachment/Video.tsx index c678feaa..35ad16e9 100644 --- a/src/components/Timeline/Shared/Attachment/Video.tsx +++ b/src/components/Timeline/Shared/Attachment/Video.tsx @@ -84,16 +84,20 @@ const AttachmentVideo: React.FC = ({ })} useNativeControls={false} onFullscreenUpdate={event => { - if (event.fullscreenUpdate === 3) { - analytics('timeline_shared_attachment_video_pause_press', { - id: video.id, - timestamp: Date.now() - }) - videoPlayer.current?.pauseAsync() + if ( + event.fullscreenUpdate === + Video.FULLSCREEN_UPDATE_PLAYER_DID_DISMISS + ) { + if (gifv) { + videoPlayer.current?.setIsLoopingAsync(true) + videoPlayer.current?.playAsync() + } else { + videoPlayer.current?.pauseAsync() + } } }} /> - + {sensitiveShown ? ( video.blurhash ? (