// This updates the time bar display (if necessary). It is called by // mProgressChecker and also from places where the time bar needs // to be updated immediately. private int setProgress() { mVideoPosition = mVideoView.getCurrentPosition(); // If the video position is smaller than the starting point of trimming, // correct it. if (mVideoPosition < mTrimStartTime) { mVideoView.seekTo(mTrimStartTime); mVideoPosition = mTrimStartTime; } // If the position is bigger than the end point of trimming, show the // replay button and pause. if (mVideoPosition >= mTrimEndTime && mTrimEndTime > 0) { if (mVideoPosition > mTrimEndTime) { mVideoView.seekTo(mTrimEndTime); mVideoPosition = mTrimEndTime; } mController.showEnded(); mVideoView.pause(); } int duration = mVideoView.getDuration(); if (duration > 0 && mTrimEndTime == 0) { mTrimEndTime = duration; } mController.setTimes(mVideoPosition, duration, mTrimStartTime, mTrimEndTime); // Enable save if there's modifications mSaveVideoTextView.setEnabled(isModified()); return mVideoPosition; }
// Start the game private void enterGame() { if (gameStatus == GAME_MENU) { gameStatus = GAME_GOGAME; showView(R.id.start, 0, 2); showLayout(R.id.main, R.id.start); // Show Tips animation AnimationDrawable animationDo; ImageView doImage = (ImageView) findViewById(R.id.ani_do); doImage.setBackgroundResource(R.drawable.animation_do); animationDo = (AnimationDrawable) doImage.getBackground(); animationDo.start(); AnimationDrawable animationNotDo; ImageView ndoImage = (ImageView) findViewById(R.id.ani_notdo); ndoImage.setBackgroundResource(R.drawable.animation_notdo); animationNotDo = (AnimationDrawable) ndoImage.getBackground(); animationNotDo.start(); showView(R.id.ani_do, 600, 4); showView(R.id.ani_notdo, 600, 4); showView(R.id.text_do, 1000, 4); showView(R.id.text_notdo, 1000, 4); label01.setText("0"); label02.setText("00:00"); label03.setText(getString(R.string.highscore) + " " + Integer.toString(mHighScore)); VideoView videoView = (VideoView) findViewById(R.id.videoView); videoView.pause(); } }
// Cuando se pausa, se llama al listener. @Override public void pause() { super.pause(); if (mListener != null) { mListener.onVideoPause(); } }
@Override public void onReceive(final Context context, final Intent intent) { if (intent.getAction().equals(VideoConst.SEND_HOSTDP_TO_VIDEOPLAYER)) { String mVideoAction = intent.getStringExtra(VideoConst.EXTRA_NAME); if (mVideoAction.equals(VideoConst.EXTRA_VALUE_VIDEO_PLAYER_PLAY)) { mVideoView.start(); } else if (mVideoAction.equals(VideoConst.EXTRA_VALUE_VIDEO_PLAYER_STOP)) { mVideoView.stopPlayback(); finish(); } else if (mVideoAction.equals(VideoConst.EXTRA_VALUE_VIDEO_PLAYER_PAUSE)) { mVideoView.pause(); } else if (mVideoAction.equals(VideoConst.EXTRA_VALUE_VIDEO_PLAYER_RESUME)) { mVideoView.resume(); mVideoView.start(); } else if (mVideoAction.equals(VideoConst.EXTRA_VALUE_VIDEO_PLAYER_SEEK)) { int pos = intent.getIntExtra("pos", -1); mVideoView.seekTo(pos); } } }
public void pauseVideo() { if (mVideoView != null) { if (LOCAL_LOGV) { Log.v(TAG, "Pausing video playback."); } mVideoView.pause(); } }
public void setUserVisibleHint(boolean isVisibleToUser) { super.setUserVisibleHint(isVisibleToUser); if (this.isVisible()) { if (!isVisibleToUser) // If we are becoming invisible, then... { videoView.pause(); } } }
@Override public void onPause() { super.onPause(); videoView.pause(); if (wifiLock != null && wifiLock.isHeld()) { wifiLock.release(); } }
// video 상태 변경 private void statVideoSet(int stat) { if (stat == 0) { mVideoView.pause(); mProgressHandler2.sendEmptyMessageDelayed(0, 0); viewSwitchSet(0); } else { mVideoView.start(); mProgressHandler2.sendEmptyMessageDelayed(0, 100); viewSwitchSet(1); } }
// SeekBar의 터치 시작 @Override public void onStartTrackingTouch(SeekBar seekBar) { try { if (mStat == 0) { mMediaPlayer.pause(); } else { mVideoView.pause(); } // Toast.makeText(getApplicationContext(), "터치시작", Toast.LENGTH_SHORT).show(); } catch (Exception e) { } }
@Override protected void onPause() { super.onPause(); if (notificationState == false) { if (checkNote == false) { mNotificationManager.notify(120, notification); checkResume = 1; } seekPosition = vRadioView.getCurrentPosition(); vRadioView.pause(); resumeState = 1; } else { notificationState = false; } }
private void playerAudio() { if (mMediaPlayer != null) { if (mAudioStat == 0) { // 현 상태가 멈춤이면 상태값을 플레이로 mAudioStat = 1; statAudioSet(mAudioStat); mVideoStat = 0; mVideoView.pause(); mProgressHandler.sendEmptyMessageDelayed(0, 0); } else { // 현 상태가 플레이면 멈춤을 하고 상태값 멈춤으로 변경 mAudioStat = 0; statAudioSet(mAudioStat); } Log.d(TAG, "mAudioStat : " + mAudioStat); } }
/** Implementation of OnPlayPauseClickedListener */ public void onFragmentPlayPause(Movie movie, int position, Boolean playPause) { mVideoView.setVideoPath(movie.getVideoUrl()); if (position == 0 || mPlaybackState == LeanbackPlaybackState.IDLE) { setupCallbacks(); mPlaybackState = LeanbackPlaybackState.IDLE; } if (playPause && mPlaybackState != LeanbackPlaybackState.PLAYING) { mPlaybackState = LeanbackPlaybackState.PLAYING; if (position > 0) { mVideoView.seekTo(position); mVideoView.start(); } } else { mPlaybackState = LeanbackPlaybackState.PAUSED; mVideoView.pause(); } updatePlaybackState(position); updateMetadata(movie); }
public void pause() { super.pause(); for (Iterator iterator = listeners.iterator(); iterator.hasNext(); ((PlaybackListener) iterator.next()).pause()) {} }
protected void onPause() { m.pause(); i.setControlsState(cuv.c); super.onPause(); }
@Override protected void onPause() { stopProgressChecker(); mSeekerPositionOnPause = mVideoView.getCurrentPosition(); mVideoView.pause(); }
@Override public void onPause() { super.onPause(); position = myVideoView.getCurrentPosition(); myVideoView.pause(); }
public void onStop() { super.onStop(); video.pause(); }
public void onPause() { super.onPause(); video.pause(); }
private void pauseVideo() { mVideoView.pause(); mController.showPaused(); }
private void stopVideo() { if (mAfternoonVideo != null) mAfternoonVideo.pause(); }