Hello,

I'm using a MediaPlayer whose events can be handle by fews listener, one of
them is a onBufferingUpdateListerner.

This listener as a method called onBufferingUpdate who takes as argument the
concernet mediaplayer and also, a progress...

The docs here consider this progress as a percentage : as defined in the doc
http://code.google.com/android/reference/android/media/MediaPlayer.OnBufferingUpdateListener.html

But each time this listener is called I compute to get the played percent of
the video, and this percent is uper the percent supposed to be load....

Here is a sample of my code :

    @Override
    public void onBufferingUpdate(MediaPlayer mp, int progress) {
        float progressl =
(((float)(VideoPlayerActivity.mp.getCurrentPosition())/((float)VideoPlayerActivity.mp.getDuration())))*100;

        Log.v((String) r.getText("MyOwnTagItSelf","played :"+progressl +
"load :" +progress);

        this.progressBar.setProgress((int)progressl);
        this.progressBar.setSecondaryProgress(progress);
    }

My logs give me : "played :12.698057load :10".

Does someone have an explanation ?

I hope I've been clear enough. However thank you for reading my problem.

Bye.

-- 
Fräntz Miccoli
+336.70.92.76.16
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to