title: How to set custom Headers in ExoPlayer using ExtractorMediaSource.Factory?
body: <p>I struggle with sending Headers to the server in order to get permission to watch the video. The important code I have already written looks like:</p>
  
  <pre><code>Handler mainHandler = new Handler();
  BandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
  TrackSelection.Factory videoTrackSelectionFactory =
      new AdaptiveTrackSelection.Factory(bandwidthMeter);
  TrackSelector trackSelector =
     new DefaultTrackSelector(videoTrackSelectionFactory);
  
  SimpleExoPlayer player =
     ExoPlayerFactory.newSimpleInstance(getApplicationContext(),  trackSelector);
  
  PlayerView playerView = new PlayerView(this);
  playerView.setLayoutParams(new FrameLayout.LayoutParams(contentWidth, contentWidth / 16 * 9));
  playerView.setPlayer(player);
  DefaultBandwidthMeter bandwidthmeter = new DefaultBandwidthMeter();
  DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(getApplicationContext(),
                          Util.getUserAgent(getApplicationContext(), "yourApplicationName"), bandwidthmeter);
   MediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)
                          .createMediaSource(streamUrl)
                          ;
   player.prepare(videoSource);
  </code></pre>
  
  <p>If somebody has an answer, please help me figure this out!</p>