VideoView black flash before and after playing

前端 未结 14 2252
谎友^
谎友^ 2020-12-09 04:04

I have a VideoView which I want to use to play a movieclip. I use it like this to play it and it works.

VideoView vv = new VideoView(this);
vv.setVideoURI(Ur         


        
14条回答
  •  北荒
    北荒 (楼主)
    2020-12-09 04:26

    There is one alternative that you are use media controller for this. Here is sample code

    videoView = (VideoView) this.findViewById(R.id.videoView);
    MediaController mc = new MediaController(this);
    videoView.setMediaController(mc);
    videoView.setVideoURI(Uri.parse("http://c421470.r70.cf2.rackcdn.com/video_5983079.m4v"));
    videoView.start();
    videoView.requestFocus(); 
    

    Try this.

提交回复
热议问题