public int getCurrentPosition() { return (int)mMediaPlayer.getTime(); }
public int getCurrentPosition() { return (int)mMediaPlayer.getTime(); }
public int getCurrentPosition() { return (int)mMediaPlayer.getTime(); }
public int getCurrentPosition() { return (int) mMediaPlayer.getTime(); }
public int getCurrentPosition() { return (int)mMediaPlayer.getTime(); }
@Override public int getCurrentPosition() { int currentPosition; if(!mMediaPlayer.isReleased()) { currentPosition = (int) mMediaPlayer.getTime(); } else { currentPosition = 0; } return currentPosition; }
/** * @return the current track position */ @Override public long getPosition() { if (mPreparedQuery != null) { return getMediaPlayerInstance().getTime(); } else { return 0L; } }
@Override public int getCurrentPosition() { return (int) getMediaPlayer().getTime(); }
private void updatePauseTime() { pauseTime = getMediaPlayer().getTime(); length = getMediaPlayer().getLength(); }
public void fastForward() { if (mPlaybackControlsRow.getCurrentTime() + (10 * 1000) < mDuration) { mediaPlayer.setTime(mPlaybackControlsRow.getCurrentTime() + (10 * 1000)); mPlaybackControlsRow.setCurrentTime((int) mediaPlayer.getTime()); } setFadingEnabled(true); }
public void rewind() { if (mPlaybackControlsRow.getCurrentTime() - (10 * 1000) > 0) { mediaPlayer.setTime(mPlaybackControlsRow.getCurrentTime() - (10 * 1000)); mPlaybackControlsRow.setCurrentTime((int) mediaPlayer.getTime()); } setFadingEnabled(true); }
/** * Set the enabled state of the video track * * @param enabled */ public void setVideoTrackEnabled(boolean enabled) { if (!enabled) { setVideoTrack(-1); } else if (getVideoTrack() == -1) { final TrackDescription tracks[] = getVideoTracks(); if (tracks != null) { for (TrackDescription track : tracks) { if (track.id != -1) { setVideoTrack(track.id); /* HACK: flush when activating a video track. This will force an * I-Frame to be displayed right away. */ if (isSeekable()) { long time = getTime(); if (time > 0) setTime(time); } break; } } } } }
/** * Set the enabled state of the video track * * @param enabled */ public void setVideoTrackEnabled(boolean enabled) { if (!enabled) { setVideoTrack(-1); } else if (getVideoTrack() == -1) { final MediaPlayer.TrackDescription tracks[] = getVideoTracks(); if (tracks != null) { for (MediaPlayer.TrackDescription track : tracks) { if (track.id != -1) { setVideoTrack(track.id); /* HACK: flush when activating a video track. This will force an * I-Frame to be displayed right away. */ if (isSeekable()) { long time = getTime(); if (time > 0) setTime(time); } break; } } } } }