[Video] Handle push/pop on Android for autoplay (#5194)
This commit is contained in:
parent
00ce95893d
commit
7e4f8cabd3
6 changed files with 45 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue