Skip to content

Commit

Permalink
[Video] Invert usage of setAudioActive (#4924)
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyok authored Aug 12, 2024
1 parent 7df2327 commit 134fcd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/App.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function App() {

React.useEffect(() => {
PlatformInfo.setAudioCategory(AudioCategory.Ambient)
PlatformInfo.setAudioActive(true)
PlatformInfo.setAudioActive(false)
initPersistedState().then(() => setReady(true))
}, [])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}}
Expand Down

0 comments on commit 134fcd3

Please sign in to comment.