Issue with videoview on Android 2.1
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开发者_Python百科 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...
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.
精彩评论