Fixed seeking when streaming
Sometimes, `media` does not know the duration. `getDuration()` loads directly from the `PlaybackService`.
This commit is contained in:
parent
cf5a876dc4
commit
5f9c70df0f
|
@ -547,7 +547,7 @@ public class PlaybackController {
|
||||||
*/
|
*/
|
||||||
public void onSeekBarStopTrackingTouch(SeekBar seekBar, float prog) {
|
public void onSeekBarStopTrackingTouch(SeekBar seekBar, float prog) {
|
||||||
if (playbackService != null && media != null) {
|
if (playbackService != null && media != null) {
|
||||||
playbackService.seekTo((int) (prog * media.getDuration()));
|
seekTo((int) (prog * getDuration()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue