com.google.android.exoplayer2.ui.TimeBar Java Examples

The following examples show how to use com.google.android.exoplayer2.ui.TimeBar. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CustomizeControlView.java    From bcm-android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onScrubMove(TimeBar timeBar, long position) {
    if (positionView != null) {
        positionView.setText(Util.getStringForTime(formatBuilder, formatter, position));
    }
    if (playPositionListener != null) {
        playPositionListener.onPositionChanged(position);
    }
}
 
Example #2
Source File: CustomizeControlView.java    From bcm-android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onScrubStop(TimeBar timeBar, long position, boolean canceled) {
    scrubbing = false;
    if (!canceled && player != null) {
        seekToTimeBarPosition(position);
    }
    hideAfterTimeout();
}
 
Example #3
Source File: ExoVideoPlaybackControlView.java    From ExoVideoView with Apache License 2.0 5 votes vote down vote up
@Override
public void onScrubStop(TimeBar timeBar, long position, boolean canceled) {
    scrubbing = false;
    if (!canceled && player != null) {
        seekToTimeBarPosition(position);
    }
    hideAfterTimeout();
}
 
Example #4
Source File: CustomizeControlView.java    From bcm-android with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void onScrubStart(TimeBar timeBar, long position) {
    removeCallbacks(hideAction);
    scrubbing = true;
}
 
Example #5
Source File: PreviewTimeBar.java    From PreviewSeekBar with Apache License 2.0 4 votes vote down vote up
@Override
public void onScrubStart(TimeBar timeBar, long position) {
    scrubProgress = (int) position;
    delegate.onScrubStart();
}
 
Example #6
Source File: PreviewTimeBar.java    From PreviewSeekBar with Apache License 2.0 4 votes vote down vote up
@Override
public void onScrubMove(TimeBar timeBar, long position) {
    scrubProgress = (int) position;
    delegate.onScrubMove((int) position, true);
}
 
Example #7
Source File: PreviewTimeBar.java    From PreviewSeekBar with Apache License 2.0 4 votes vote down vote up
@Override
public void onScrubStop(TimeBar timeBar, long position, boolean canceled) {
    scrubProgress = (int) position;
    delegate.onScrubStop();
}
 
Example #8
Source File: ExoVideoPlaybackControlView.java    From ExoVideoView with Apache License 2.0 4 votes vote down vote up
@Override
public void onScrubStart(TimeBar timeBar, long position) {
    removeCallbacks(hideAction);
    scrubbing = true;
}
 
Example #9
Source File: ExoVideoPlaybackControlView.java    From ExoVideoView with Apache License 2.0 4 votes vote down vote up
@Override
public void onScrubMove(TimeBar timeBar, long position) {
    if (positionView != null) {
        positionView.setText(Util.getStringForTime(formatBuilder, formatter, position));
    }
}