VideoView stopPlayback - 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 stopPlayback method.

This code example shows how to use the following methods:stopPlayback
        mVideoView.start();
    } 
 
    @Override 
    public void stop() { 
        mVideoView.stopPlayback();
    } 
 
    @Override 
    public void destroyView() { 
        mVideoView.stopPlayback();
        mCustomViewCallback.onCustomViewHidden();
    } 
 
    @Override 
    public String getViewType() {
        return ""; 
    } 
 
} 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:stopPlayback
	} 
 
	//----------------------------------------------------------------// 
	public void stopPlayback () { 
 
		mVideoView.stopPlayback ();
	} 
 
	//================================================================// 
	// OnPreparedListener methods 
	//================================================================// 
 
	public void onPrepared ( MediaPlayer mediaPlayer ) {
 
		MoaiLog.i ( "MoaiMoviePlayer onPrepared" ); 
		 
		AKUNotifyMoviePlayerReady (); 
	} 
 
	//================================================================// 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setOnTouchListener, setOnCompletionListener, stopPlayback
	 * Release media player, assets, listeners, etc. Load up the Caster activity 
	 */ 
	private void loadNextLevel() { 
		Log.e(TAG, "finished. Loading Caster");
		try { 
			travel.stopPlayback();
        	Intent ourIntent = new Intent(TravelScene.this, Class.forName("org.MAG.Caster"));
        	travel.setOnTouchListener(null);
        	travel.setOnCompletionListener(null);
        	ourIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
			startActivity(ourIntent);
			finish();
		} catch (ClassNotFoundException ex) {
			Log.e(TAG, "Failed to jump to another activity");
		} 
	} 
 
	public void onCompletion(MediaPlayer mp) {
		loadNextLevel(); 
	} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getCurrentPosition, isPlaying, stopPlayback
This code example shows how to use the following methods:getCurrentPosition, getDuration, stopPlayback
    	super.onStart(); 
    } 
	@Override 
	public void onPause() { 
    	// Stop video when the activity is pause. 
    	mPositionWhenPaused = mVideoView.getCurrentPosition();
    	mVideoView.stopPlayback();
    	Log.d(TAG, "OnStop: mPositionWhenPaused = " + mPositionWhenPaused);
    	Log.d(TAG, "OnStop: getDuration  = " + mVideoView.getDuration());
 
    	super.onPause(); 
    } 
	@Override 
	public void onResume() { 
    	// Resume video player 
    	if(mPositionWhenPaused >= 0) {
    		mVideoView.seekTo(mPositionWhenPaused);
    		mPositionWhenPaused = -1;
    	} 
 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:isPlaying, setMediaController, setVideoPath, start, stopPlayback
		this.layoutVideo = (LinearLayout) v.findViewById(R.id.layoutVideo);
		return v;
	}// onCreateView 
 
	public void stopPlayback() { 
		videoView.stopPlayback();
	}// stopPlayback 
 
	public void hide() { 
		layoutVideo.setVisibility(View.GONE);
	} // hide 
 
	public void update(ContentUnit content_unit) {
		if (this.contentUnit != null) {
			if (this.contentUnit.getParent() == null
					&& content_unit.getParent() != null) {
				this.stopPlayback();
			} else if (this.contentUnit.getAncestors() != null
					&& content_unit.getParent() == null) {
				this.stopPlayback();

5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:isActivated, setVideoPath, start, stopPlayback
                    return; 
                } 
                if (bundle.containsKey("u")) {
                    final String url = bundle.getString("u");
                    Log.i(TAG, "set-video-path: " + url);
                    mVideoView.setVideoPath(url);
                    if (mVideoView.isActivated()) {
                        mVideoView.stopPlayback();
                    } 
                    mVideoView.start();
                } 
            } 
        }; 
        registerReceiver(mCommander, new IntentFilter("mpctrl"));
    } 
 
    @Override 
    protected void onPause() { 
        mVideoView.stopPlayback();
        super.onPause(); 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setVideoURI, stopPlayback
    return !"file".equals(scheme);
  } 
 
  private void openVideo() { 
    if (progress != null) { progress.setVisibility(View.VISIBLE); }
    videoView.stopPlayback();
    final Uri uri = getArguments().<Uri>getParcelable(EXTRA_SOURCE_URI);
    videoView.setVideoURI(uri);
  } 
 
  public void invalidateView() { 
    final boolean show = controller != null && controller.isShowing();
    if (DEBUG) { Log.d(TAG, "Invalidate view, controller showing: " + show); }
    if (show) {
      controller.hide();
      // XXX don't know when we have new dimensions, it should be done with something like requestLayout 
      final long delay = 250;
      handler.removeCallbacks(showController);
      handler.postDelayed(showController, delay);
    } 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setVideoURI, stopPlayback
    return !"file".equals(scheme);
  } 
 
  private void openVideo() { 
    if (progress != null) { progress.setVisibility(View.VISIBLE); }
    videoView.stopPlayback();
    final Uri uri = getArguments().<Uri>getParcelable(EXTRA_SOURCE_URI);
    videoView.setVideoURI(uri);
  } 
 
  public void invalidateView() { 
    final boolean show = controller != null && controller.isShowing();
    if (DEBUG) { Log.d(TAG, "Invalidate view, controller showing: " + show); }
    if (show) {
      controller.hide();
      // XXX don't know when we have new dimensions, it should be done with something like requestLayout 
      final long delay = 250;
      handler.removeCallbacks(showController);
      handler.postDelayed(showController, delay);
    } 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getCurrentPosition, isPlaying, stopPlayback

Related VideoView stopPlayback Questions & Answers: