I'm currently working on an app that plays videos, some native, some HTML5. For the native videos I use ExoPlayer to play the videos but some sources don't provide me with the raw video file so these must be played within a WebView as HTML5 videos. All videos begin playback with their audio muted and if the user unmutes the video I obtain audio focus. This works great with the ExoPlayer videos but the WebView obtains audio focus as soon as video playback begins.
Is there any way to prevent this behavior and instead only obtain the audio focus when the video is unmuted?