Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to check end time of video when video is pause and activity pause,destroyed,stop #42

Closed
rssumit opened this issue Jan 5, 2018 · 1 comment

Comments

@rssumit
Copy link

rssumit commented Jan 5, 2018

How to check end time of video when the video is pause and activity pause, destroyed, stop.
When the user starts the video, if he pauses the video and go back(pause, stop, destroyed activity,pause video).after this video should start from last timestamp.

@linsea
Copy link
Owner

linsea commented Feb 1, 2018

see the sample:
save your video position on protected void onSaveInstanceState(Bundle outState);
and when user back, on public void onStart(MediaPlayer mediaPlayer) seek to the saved position :

    @Override
    public void onStart(MediaPlayer mediaPlayer) {
        Log.d(TAG, "onStart UniversalVideoView callback");
        mVideoView.seekTo(mSeekPosition);  // seek to the saved position
    }

@linsea linsea closed this as completed Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants