VideoView Android。如何在不停止其他视频/音轨的情况下播放视频?

时间:2016-04-14 12:49:19

标签: android android-mediaplayer android-videoview

  

当我在活动中播放视频时,其他应用程序正在停止播放音频/视频。

        Uri video = Uri.parse("android.resource://" +    getActivity().getPackageName() + "/"
                +  splash_vid);

        splashvideo.setVisibility(View.VISIBLE);

        splashvideo.setZOrderOnTop(false);
        splashvideo.setZOrderMediaOverlay(true);
        splashvideo.setVideoURI(video);
        splashvideo.setOnCompletionListener(mp -> jumpBack());
        splashvideo.requestFocus();
        splashvideo.setDrawingCacheEnabled(true);
        splashvideo.setOnErrorListener(this);
        splashvideo.start();
        splashvideo.setOnCompletionListener(this);
        splashvideo.setOnPreparedListener(this);

0 个答案:

没有答案