[Video] Invert usage of setAudioActive (#4924)
This commit is contained in:
+1
-1
@@ -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))
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
|||||||
@@ -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()
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user