0

private void setupVideoToPlay(Bundle savedInstanceState,View parent) {
   mVideoView=(VideoView)parent.findViewById(R.id.videoview);
    
   mMediaController=new MediaController(getContext());
   mMediaController.setAnchorView(mVideoView);
   mVideoView.setMediaController(mMediaController);
      
   mVideoView.setVideoURI(Uri.parse(mVideoUrl));
    
   mVideoView.requestFocus();
   if(null != savedInstanceState ) {
      int position = savedInstanceState.getInt(VIDEO_SEEK_POSITION);
      mVideoView.seekTo(position);
   } else {
      mVideoView.start();
    
   }
}

|

1

1

|