VideoView canSeekForward - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for VideoView canSeekForward method.

This code example shows how to use the following methods:canSeekForward, getDuration, isPlaying, seekTo, start
              
       // Don't start until ready to play.  The arg of seekTo(arg) is the start point in 
       // milliseconds from the beginning. In this example we start playing 1/5 of 
       // the way through the video if the player can do forward seeks on the video. 
        
       if(videoPlayer.canSeekForward()) videoPlayer.seekTo(videoPlayer.getDuration()/5);
       videoPlayer.start();
       Log.i("IS PLAYING", Boolean.toString(videoPlayer.isPlaying()));
    } 
     
    /** This callback will be invoked when the file is finished playing */ 
    @Override 
    public void onCompletion(MediaPlayer  mp) {
       // Statements to be executed when the video finishes. 
       this.finish();	
    } 
     
    /**  Use screen touches to toggle the video between playing and paused. */ 
    @Override 
    public boolean onTouchEvent (MotionEvent ev){
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:canSeekForward, seekTo
		context = this;
		try { 
			 
			if (videoView != null && currentPosition != 0) {
 
				if (videoView.canSeekForward())
					videoView.seekTo(currentPosition);
 
			} 
		} catch (Exception e) {
		//	Logs.show(e); 
		} 
 
	} 
 
	private void initialize() { 
		try { 
 
			if (!Util.isInternetAvailable()) { 
 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java