title: ExoPlayer doesn't play video
body: <p>I've done the next implementation of ExoPlayer for playing HLS:</p>
  
  <pre><code>SimpleExoPlayer player;
  
  player = ExoPlayerFactory.newSimpleInstance(mContext, trackSelector, loadControl);
  
                      Handler mHandler = new Handler();
                      String userAgent = Util.getUserAgent(mContext, "appName");
                      DataSource.Factory dataSourceFactory = new DefaultHttpDataSourceFactory(
                              userAgent, null,
                              DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS,
                              1800000,
                              true);
                      HlsMediaSource mediaSource = new HlsMediaSource(Uri.parse(URL), dataSourceFactory, 1800000,
                              mHandler, null);
                      player.setPlayWhenReady(true);
                      player.prepare(mediaSource);
  </code></pre>
  
  <p>Then I've found that my code playing only audio and I was searching till I found this:</p>
  
  <pre><code>PlayerView playerView;
  playerView = view.findViewById(R.id.pView);
  playerView.setPlayer(player);
  </code></pre>
  
  <p>layout with playerView:</p>
  
  <pre><code>&lt;RelativeLayout
      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:id="@+id/RLteleNew"
      android:keepScreenOn="true"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@color/gray21"
      &gt;
  
  ...
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_below="@+id/LLtopnew2"
          &gt;
  
          &lt;com.google.android.exoplayer2.ui.PlayerView
          android:id="@+id/pView"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_gravity="center"
          android:layout_centerVertical="true"
          android:visibility="visible"&gt;
      &lt;/com.google.android.exoplayer2.ui.PlayerView&gt;
  &lt;/RelativeLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>In all of examples this is solution for playing video but when I adding this to my code - Exoplayer playing nothing. </p>
  
  <p>What should I edit in my code?</p>
  
  <p><strong>Found one more good guide for ExoPlayer implementation:</strong>
  <a href="https://exoplayer.dev/hello-world.html" rel="nofollow noreferrer">https://exoplayer.dev/hello-world.html</a></p>
  
  <p>Seems like I have done everything right. </p>
  
  <p>Does anybody have ideas why it is not working?</p>