diff options
author | Hailey <me@haileyok.com> | 2024-09-06 15:01:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-06 15:01:05 -0700 |
commit | 7e4f8cabd3971bdf19647d122e3267ab6d1991e8 (patch) | |
tree | 412ab40714dde2e8d5b53a9fe931648053bb81fe /src/view/com/util/post-embeds/VideoEmbedInner/VideoEmbedInnerNative.tsx | |
parent | 00ce95893d9f661a378db002f25def281e433d8b (diff) | |
download | voidsky-7e4f8cabd3971bdf19647d122e3267ab6d1991e8.tar.zst |
[Video] Handle push/pop on Android for autoplay (#5194)
Diffstat (limited to 'src/view/com/util/post-embeds/VideoEmbedInner/VideoEmbedInnerNative.tsx')
-rw-r--r-- | src/view/com/util/post-embeds/VideoEmbedInner/VideoEmbedInnerNative.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/view/com/util/post-embeds/VideoEmbedInner/VideoEmbedInnerNative.tsx b/src/view/com/util/post-embeds/VideoEmbedInner/VideoEmbedInnerNative.tsx index 31e863038..de9a2c74c 100644 --- a/src/view/com/util/post-embeds/VideoEmbedInner/VideoEmbedInnerNative.tsx +++ b/src/view/com/util/post-embeds/VideoEmbedInner/VideoEmbedInnerNative.tsx @@ -8,6 +8,7 @@ import {useLingui} from '@lingui/react' import {HITSLOP_30} from '#/lib/constants' import {clamp} from '#/lib/numbers' +import {isAndroid} from 'platform/detection' import {useActiveVideoNative} from 'view/com/util/post-embeds/ActiveVideoNativeContext' import {atoms as a, useTheme} from '#/alf' import {Mute_Stroke2_Corner0_Rounded as MuteIcon} from '#/components/icons/Mute' @@ -61,6 +62,9 @@ export function VideoEmbedInnerNative({ PlatformInfo.setAudioActive(true) player.muted = false setIsFullscreen(true) + if (isAndroid) { + player.play() + } }} onFullscreenExit={() => { PlatformInfo.setAudioCategory(AudioCategory.Ambient) |