Get the video time while playing android -


i want ask how time of video while plays. using videoview. let example, when playing video length of 10 minutes , in 4th minute, how can value of 4 minute? appreciated. thank you. below code in playing video.

 private void playvideo(){     mediacontroller mc = new mediacontroller(getactivity());             mc.setanchorview(videomovie);                         uri video = uri.parse(url);                          videomovie.setmediacontroller(mc);             videomovie.setvideouri(video);             videomovie.setonpreparedlistener(new onpreparedlistener() {                  @override                 public void onprepared(mediaplayer mp) {                     videomovie.start();                 }              });     } 

look tutorial
, if want time of video while plays, code work well

 videoview.getduration() 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -