user1840638
user1840638

Reputation: 11

How can i get a time data for video stream?

I study android.

How can i calculate and predict a time that is video buffering when use video streaming.

It will calculate time when showing video streaming.(ex youtube)

  1. How catch a point of start and end streaming.

  2. How catch a point of start and end buffering.

Thanks for your help.

Upvotes: 1

Views: 201

Answers (2)

Talha
Talha

Reputation: 12719

You can use onBufferingUpdate to catch buffer percantage

public void onBufferingUpdate(MediaPlayer arg0, int percent) {
        Log.d(TAG, "onBufferingUpdate percent:" + percent);
    }

Upvotes: 1

Joep_H
Joep_H

Reputation: 362

Use a Timer object? Android Timer and make it increment an object every 1000 ms.

Upvotes: 0

Related Questions