[Video] Invert usage of `setAudioActive` (#4924)

zio/stable
Hailey 2024-08-12 14:58:41 -07:00 committed by GitHub
parent 7df2327424
commit 134fcd35d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -159,7 +159,7 @@ function App() {
React.useEffect(() => { React.useEffect(() => {
PlatformInfo.setAudioCategory(AudioCategory.Ambient) PlatformInfo.setAudioCategory(AudioCategory.Ambient)
PlatformInfo.setAudioActive(true) PlatformInfo.setAudioActive(false)
initPersistedState().then(() => setReady(true)) initPersistedState().then(() => setReady(true))
}, []) }, [])

View File

@ -60,12 +60,12 @@ export function VideoEmbedInnerNative() {
nativeControls={true} nativeControls={true}
onEnterFullscreen={() => { onEnterFullscreen={() => {
PlatformInfo.setAudioCategory(AudioCategory.Playback) PlatformInfo.setAudioCategory(AudioCategory.Playback)
PlatformInfo.setAudioActive(false) PlatformInfo.setAudioActive(true)
player.muted = false player.muted = false
}} }}
onExitFullscreen={() => { onExitFullscreen={() => {
PlatformInfo.setAudioCategory(AudioCategory.Ambient) PlatformInfo.setAudioCategory(AudioCategory.Ambient)
PlatformInfo.setAudioActive(true) PlatformInfo.setAudioActive(false)
player.muted = true player.muted = true
if (!player.playing) player.play() if (!player.playing) player.play()
}} }}