I have a VideoView
, and I want to play a short looped video with no audio. The problem is, when I'm listening to a book or music through my phone and then I get to the activity that plays this looped video, my music is paused. Is there a way to play the video without interrupting whatever audio might be already playing on the phone?
videoView.setVideoURI(descriptionVideo.getUri(getPackageName()));
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mediaPlayer) {
mediaPlayer.setVolume(0f,0f);
mediaPlayer.setLooping(true);
videoView.start();
}
});