title: Exoplayer only showing black screen not playing the video
body: <p>When I open the  app empty player with black screen  is showing and the play button is changing to pause button after a second or two seconds, as per below I have tried</p>
  
  <p>Dependencies I have used in app gradle file</p>
  
  <pre><code>implementation 'com.google.android.exoplayer:exoplayer-core:2.9.6 
  implementation 'com.google.android.exoplayer:exoplayer-dash:2.9.6'
  implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.6'
  implementation 'com.google.android.exoplayer:exoplayer:2.9.6'
  </code></pre>
  
  <p><strong>MY LAYOUT FILE-</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      tools:context=".MainActivity"&gt;
  
      &lt;com.google.android.exoplayer2.ui.PlayerView
          android:id="@+id/exoplayer"
          android:layout_width="match_parent"
          android:layout_height="match_parent"/&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>MainActivity class</strong></p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      private PlayerView playerView;
      private SimpleExoPlayer player;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          playerView=findViewById(R.id.exoplayer);
      }
  
  
      @Override
      protected void onStart() {
          super.onStart();
          player= ExoPlayerFactory.newSimpleInstance(this,new DefaultTrackSelector());
  
          playerView.setPlayer(player);
          DefaultDataSourceFactory dataSourceFactory=new DefaultDataSourceFactory(this,
                  Util.getUserAgent(this,"exo-demo"));
  
  
          ExtractorMediaSource mediaSource=new ExtractorMediaSource.Factory(dataSourceFactory)
                  .createMediaSource(Uri.parse("https://www.youtube.com/watch?v=uMArzRFRgvw&amp;list=WL&amp;index=2&amp;t=0s"));
  
  
          player.prepare(mediaSource);
          player.setPlayWhenReady(true);
  
      }
  
  
      @Override
      protected void onStop() {
          super.onStop();
          playerView.setPlayer(null);
          player.release();
          player=null;
      }
  }
  </code></pre>