Guest User

Untitled

a guest
Nov 18th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. @Override
  2. public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
  3. Log.d(VideoDetailActivity.class.getName(),"onPlayerStateChanged:"+playbackState);
  4. if (playbackState == Player.STATE_ENDED) {
  5. Log.d(VideoDetailActivity.class.getName(),"video ended");
  6. //player.seekTo(0);
  7. //player.setPlayWhenReady(false);
  8. showRatingDialog();
  9. }
  10. }
  11.  
  12.  
  13. When uncommenting above two lines to set my videoplayer again to its zero position then STATE_ENDED is again getting fired.
  14. How to avoid this
Add Comment
Please, Sign In to add comment