[Video] Invert usage of `setAudioActive` (#4924)
parent
7df2327424
commit
134fcd35d8
|
@ -159,7 +159,7 @@ function App() {
|
|||
|
||||
React.useEffect(() => {
|
||||
PlatformInfo.setAudioCategory(AudioCategory.Ambient)
|
||||
PlatformInfo.setAudioActive(true)
|
||||
PlatformInfo.setAudioActive(false)
|
||||
initPersistedState().then(() => setReady(true))
|
||||
}, [])
|
||||
|
||||
|
|
|
@ -60,12 +60,12 @@ export function VideoEmbedInnerNative() {
|
|||
nativeControls={true}
|
||||
onEnterFullscreen={() => {
|
||||
PlatformInfo.setAudioCategory(AudioCategory.Playback)
|
||||
PlatformInfo.setAudioActive(false)
|
||||
PlatformInfo.setAudioActive(true)
|
||||
player.muted = false
|
||||
}}
|
||||
onExitFullscreen={() => {
|
||||
PlatformInfo.setAudioCategory(AudioCategory.Ambient)
|
||||
PlatformInfo.setAudioActive(true)
|
||||
PlatformInfo.setAudioActive(false)
|
||||
player.muted = true
|
||||
if (!player.playing) player.play()
|
||||
}}
|
||||
|
|
Loading…
Reference in New Issue