mardi 4 août 2015

How to display total duration and current position of video in MediaController in android?

I am writing Android app, which plays HLS stream. I need to implement MediaController, that can seek video. On seeking my program must calculate timestamp, get new stream URL from server and then refresh MediaPlayer. I implemented interface MediaController.MediaPlayerControl with my own getDuration() and getCurrentPosition(). For now it's only static values. But these methods take effect only with SeekBar, but nothing with labels (always 00:00):

enter image description here

I didn't implement SeekBar functionality yet. Firstly I'd like to understand how to setup labels duration on MediaController. How do it properly?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire