title: Exoplayer can not call seekTo()
body: <p>I am trying to set Exoplayer into Fragment, I passed video url in <code>initializePlayer(String mediaUri)</code>
  video working well, but if I rotate the device, video restarted, I read several  tutorials to solve this issue with no success to call <code>seekTo()</code>
  sorry for my English </p>
  
  <pre><code>          public RecipeStepsVideoPlayerFragment() {
      // Required empty public constructor
    }
  
    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
      super.onActivityCreated(savedInstanceState);
  
    }
  
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
      // Inflate the layout for this fragment
      View view= inflater.inflate(R.layout.fragment_recipe_steps_video_player, container, false);
      ButterKnife.bind(this, view);
      Bundle bundle=getArguments();
      if(bundle!=null){
        videoUrl=bundle.getString(VIDEO_URL_KEY);
        }
      initializePlayer(videoUrl);
      stepDescription.setText(bundle.getString(STEP_DESCRIPTION_KEY));
    return view;
    }
    @Override
    public void onViewStateRestored(@Nullable Bundle savedInstanceState) {
      super.onViewStateRestored(savedInstanceState);
      if (savedInstanceState != null) {
        startAutoPlay = savedInstanceState.getBoolean(KEY_AUTO_PLAY);
        startWindow = savedInstanceState.getInt(KEY_WINDOW);
        startPosition = savedInstanceState.getLong(KEY_POSITION);
        Toast.makeText(getContext(),startPosition.toString(), Toast.LENGTH_LONG).show();
      }
    }
    @Override
    public void onSaveInstanceState(Bundle outState) {
  releasePlayer();
      outState.putBoolean(KEY_AUTO_PLAY, startAutoPlay);
      outState.putInt(KEY_WINDOW, startWindow);
      outState.putLong(KEY_POSITION, startPosition);
    }
  
  
    public void initializePlayer(String mediaUri) {
             if (mExoPlayer == null) {
               BandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
               TrackSelection.Factory videoTrackSelectionFactory =
                   new AdaptiveTrackSelection.Factory(bandwidthMeter);
               trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory);
                   mExoPlayer = ExoPlayerFactory.newSimpleInstance(getContext(), trackSelector);
                   mPlayerView.setPlayer(mExoPlayer);
                mediaDataSourceFactory = new DefaultDataSourceFactory(getContext(),
                   Util.getUserAgent(getContext(), "BakingX"),
                   (TransferListener&lt;? super DataSource&gt;) bandwidthMeter);
  
                      mediaSource = new  ExtractorMediaSource
                          .Factory(mediaDataSourceFactory)
                          .createMediaSource(Uri.parse(mediaUri));
   //my prolem I can not call seekTo                
  if (startPosition!=null) {
                 mExoPlayer.seekTo(startWindow,startPosition);
               }
  
                   mExoPlayer.prepare(mediaSource);
                   mExoPlayer.setPlayWhenReady(playWhenReady);
  
              }
  
       }
  
   private void releasePlayer() {
     if (mExoPlayer!= null) {
       startPosition = mExoPlayer.getCurrentPosition();
       startWindow = mExoPlayer.getCurrentWindowIndex();
       playWhenReady = mExoPlayer.getPlayWhenReady();
       mExoPlayer.release();
       mExoPlayer = null;
     }
   }
  
  
    private void updateStartPosition() {
      if (mExoPlayer != null) {
        startAutoPlay = mExoPlayer.getPlayWhenReady();
        startWindow = mExoPlayer.getCurrentWindowIndex();
        startPosition = Math.max(0, mExoPlayer.getContentPosition());
      }
    }
  
    @Override
    public void onStart() {
      super.onStart();
     if (Util.SDK_INT &gt; 23) {
        initializePlayer(videoUrl);
     }
    }
    @Override
    public void onResume() {
      super.onResume();
    if (Util.SDK_INT &lt;= 23 || mExoPlayer == null) {
        initializePlayer(videoUrl);
      }
    }
  
    @Override
    public void onPause() {
      super.onPause();
      updateStartPosition();
      if (Util.SDK_INT &lt;= 23) {
        releasePlayer();
      }
    }
  
    @Override
    public void onStop() {
      super.onStop();
     // releasePlayer();
     if (Util.SDK_INT &gt; 23) {
        releasePlayer();
      }
    }
  
    @Override
    public void onDestroy() {
  
      super.onDestroy();
      releasePlayer();
    }
  
  }
  </code></pre>
  
  <p>my question exactly how I call <code>seekTo()</code> after mobile rotation </p>