VideoView freezes, or VideoView directly calls OnCompletion

All your problems with Audio, Video and Images.

VideoView freezes, or VideoView directly calls OnCompletion

Postby moju27 » Thu Oct 29, 2009 9:39 pm

Hi everyone,

I'm having some problems with the VideoView.

For most of the videos that I stream, it shows the media controller, shows the first image and freezes for about 20 or 30 seconds while it's buffering. Then it starts really playing and about every 30 seconds, the same thing happens, it freezes for a while and the logs say it's buffering.
This occurs on the emulator as well as on the device, in WIFI or in 3G. I tried to reduce the quality of the stream but it doesn't change anything.

For some other videos, the OnPrepared listener of VideoView is not even called. It directly goes to the OnCompletion listener. When entering this listener, mediaPlayer.getDuration() returns -1, and mediaPlayer.getCurrentPosition() returns 0. I see on my logs thanks to PlayerDriver that it's buffering until it reaches 100%, but the video is not playing even if I try mediaPlayer.start() or videoView.start(), etc ...

Does anyone have any idea ? How could I solve those problems ?
I wish I had a mediaPlayer.setDuration() or mediaPlayer.startAfterLoading(x bytes) ... I guess it would solve everything.

Thanks !
Once Poster
Once Poster
Posts: 1
Joined: Thu Oct 29, 2009 9:13 pm


Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 13 guests