How to prevent VideoView/MediaPlayer from stopping other apps' audio?

后端 未结 3 527
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-06 07:13

In one screen I have a looping background video (upon which normal UI elements are shown), implemented with VideoView like this:

String resPath = \"android.         


        
3条回答
  •  清歌不尽
    2020-12-06 07:31

    This worked for me:

    videoView.setAudioFocusRequest(AudioManager.AUDIOFOCUS_NONE);
    

    (before .setVideUri() call)

提交回复
热议问题