1

I try to stream (progressive e.g: http://server.com/video.mp4)

when i use the standard google mediaplayer (VideoView from android package) and register an onBufferingUpdateListener then i get the bufferpercentage that refers to the download state of the hole video. This player has also a loading view where i can see the buffer state. This bufferpercentage and view shows me how much of the video has been downloaded.

Now when i use the Vitamio player, the onBufferingUpdateListener shows me after a few seconds 99 percent of buffering and there is no loading view too. And when i pause the playback it stops buffering immediately instead of continue buffering like the google videoview does. This is very usefull if you have a slow http stream.

Is there a way to make the vitamio-videoplayer buffer the videofiles in the same way as the google videoplayer does?

thank you daniel

user2389812
  • 11
  • 1
  • 3
  • on both i registered an OnBufferingUpdateListener with: videoview.setOnBufferingUpdateListener(new OnBufferingUpdateListener...); – user2389812 May 16 '13 at 12:38

1 Answers1

1

Sorry i posted that question as wrong user. Here the Answer of what i tried:

VideoView (android default - just plays few video formats) from inside the android.widget and from io.vov.vitamio.widget (vitamio - plays most video formats) package has the same structure. In both you can register an OnBufferingUdateListener that returns the bufferstate in percent:

videoview.setOnBufferingUpdateListener(new io.vov.vitamio.MediaPlayer.OnBufferingUpdateListener() {

        public void onBufferingUpdate(io.vov.vitamio.MediaPlayer mp, int i) {
            Log.v(TAG, "Buffer percentage done: "+i);
        }
    });

or with the android default VideoView:

videoview.setOnBufferingUpdateListener(new android.media.MediaPlayer.OnBufferingUpdateListener() {

        public void onBufferingUpdate(android.media.MediaPlayer mp, int i) {
            Log.v(TAG, "Buffer percentage done: "+i);
        }
    });

If i use android.widget.VideoView the buffer percentage slowly increases until it reaches 100% - The video file has been downloaded completely. And it continues updating BufferingUpdate when i press the pause button.

When i use io.vov.vitamio.widget.VideoView the percentage reaches 100% within seconds. Then the video starts and the OnBufferingUpdateListener never gets called again (when i call getBufferPercentage it is always at 99 percent. That seems to be the reason). And as i sayed: It seems to stop buffering when i press the pause button.

I think the buffering works different in vitamio. But that's crap. Especially when i stream videos from the web and the video datarate is higher than the download speed i need to prebuffer the video by pressing pause and wait until it has downloaded enough data to watch it smoothly. Hope you got what i mean. thank you

Dano
  • 239
  • 3
  • 10