/** * If a video is currently in playback then the playback will be stopped and the progressPoll will * be stopped (see {@link #startProgressPoll()}) */ public void stopPlayback() { if (!useExo) { videoView.stopPlayback(); } else { emExoPlayer.setPlayWhenReady(false); } if (defaultControls != null) { defaultControls.updatePlayPauseImage(false); defaultControls.show(); } playRequested = false; stopProgressPoll(); }
/** * Starts the playback for the video specified in {@link #setVideoURI(android.net.Uri)} or {@link * #setVideoPath(String)}. This should be called after the VideoView is correctly prepared (see * {@link #setOnPreparedListener(android.media.MediaPlayer.OnPreparedListener)}) */ public void start() { if (!useExo) { videoView.start(); } else { emExoPlayer.setPlayWhenReady(true); } if (defaultControls != null) { defaultControls.updatePlayPauseImage(true); defaultControls.hideDelayed(DefaultControls.DEFAULT_CONTROL_HIDE_DELAY); } playRequested = true; startProgressPoll(); }