tags:

views:

138

answers:

1

Hi all.

i am trying to play a video via streaming in my android application. Video playing functionality works good but whenever changes the orientation of the phone...a white screen comes over the video view and audio keeps playing. And after turning back to original orientation, video starts playing normally..(with proper video and audio.).

Please help.. what should i do??

thanks...

A: 

You may want to lock your activity into a single orientation (i.e. landscape). If not, I'd suggest creating your own MediaPlayer instead of using VideoView, and persisting the MediaPlayer object across configuration changes using onRetainNonConfigurationInstance. Note that you might have to do some teardown and setup of the media playback output surface in this case.

Roman Nurik
Roman, i am facing this issue only on Android 2.1 devices.. but when i run my code on G1, hero(which are 1.5 devices), it works perfectly well, no white screen on orientation change..nothing everything works perfect.
mudit