I want to get current duration of video. I am using ExoPlayer(Exoplayer is used to play videos it is a video player) and i want to display current video playing duration. The method getCurrentDuration() is used to get current duration of video so I want to get that duration in log. That is why i code like this but it is not providing correct duration. I want that when video is playing and the current duration which is showing on seek bar should be displayed in log also.
for (long x=0;x<10000000;x++){
long position = mPlayer.getCurrentPosition();
Log.d(">>>>AdPopUp", Long.toString(position));