How to continue rtsp video play while orientation change in android
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/11629556/how-to-continue-video-play-while-orientation-change-in-android">How to continue video play while orientation change in android</a>  </p>
</blockquote>



<p>I'm just playing an rtsp video on android default player.Halfly, when i change orientation into landscape,it starts streaming from beginning.How could i do continue playing.I gave androidconfig="orientation" on manifest file.But still happens same.What else i need to do for that?</p>

<p>My code:</p>

<p>private String vSource="http://commonsware.com/misc/test2.3gp";</p>

<pre><code>/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    // sets the Bundle
    super.onCreate(savedInstanceState);
    // sets the context
    setContentView(R.layout.main);
    myVideoView= (VideoView)findViewById(R.id.vview);
       myVideoView.setVideoURI(Uri.parse(vSource));
       myVideoView.setMediaController(new MediaController(this));
       myVideoView.requestFocus();
       myVideoView.start();


}

public void onSaveInstanceState(Bundle outState){

    mStartTime = myVideoView.getCurrentPosition();
    outState.putInt("restartTime", mStartTime);
    super.onSaveInstanceState(outState);
}
 @Override
    public void onRestoreInstanceState(Bundle savedInstanceState) {
      super.onRestoreInstanceState(savedInstanceState);
      myInt  = savedInstanceState.getInt("restartTime");

 }

@Override
public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);


      myVideoView.seekTo(myInt);

      myVideoView.start();


}
</code></pre>

<p>Thanks.</p>
