How to mix, duck react-native-webview audio with other apps?

Viewed 29

I have an HTML5 Video embedded in a web view. When it starts playing, the sound of other apps in the background like Spotify will pause. But when it plays muted the background app sounds will not pause. Is there any way to play the background apps sound while the web view video plays?

I want the html5 player to have a mixWithOthers option like mix or duck which is the same as react-native-video.

My current Web view code

<WebView
  allowsInlineMediaPlayback
  mediaPlaybackRequiresUserAction={true}
  allowsFullscreenVideo={false}
  source={{html: player(videoId, controls, muted)}}
  ref={ref}
  onMessage={onBridgeMessage}
  scalesPageToFit={scalesPageToFit}
  onNavigationStateChange={(a) => { console.log("onNavigationStateChange", a?.url) }}
/>
0 Answers
Related