title: Seekbar/Seek Buttons are disabled in Exoplayer for .mkv files
body: <p>In an Android App, I am trying to play videos from URL using <a href="https://exoplayer.dev" rel="nofollow noreferrer">Exoplayer</a>. For <code>.mp4</code> files it plays fine including seeking features. But when I try with <code>.mkv</code> videos it plays but seekbar (Timebar) looks like progressbar (doesn't support seeking by user). Also seek buttons do not get activated, nothing happens on click.
  Tested with 50+ videos. File size of them are between 20mb to 150mb.</p>
  <p>Another confusing observation is everything works with another <code>.mkv</code> video with 13 sec duration and size less than 1mb.</p>
  <p>Seek feature is not working for large <code>.mkv</code> files. Tested with following link <em>[Link removed after getting solution]</em></p>
  <p><a href="https://i.stack.imgur.com/hC4yD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hC4yD.jpg" alt="Seek feature is not working for large mkv files" /></a></p>
  <p>Seek feature is working for any <code>.mp4</code> files and small <code>.mkv</code> files. Works for the following link-
  <em>[Link removed after getting solution]</em>
  <a href="https://i.stack.imgur.com/Ua1eB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ua1eB.jpg" alt="Seek feature is working for mp4 files" /></a></p>
  <p>Here is my code from android side-</p>
  <p><strong>Dependency-</strong></p>
  <pre><code>implementation 'com.google.android.exoplayer:exoplayer:2.10.5'
  </code></pre>
  <p><strong>VideoPlayerActivity.java</strong></p>
  <pre><code>DefaultHttpDataSourceFactory dataSourceFactory = new DefaultHttpDataSourceFactory(Util.getUserAgent(this, getString(R.string.app_name)));
  Map&lt;String, String&gt; headers = new HashMap&lt;&gt;();
  headers.put(&quot;accept&quot;, &quot;application/json&quot;);
  headers.put(..., ...);
  dataSourceFactory.getDefaultRequestProperties().set(headers);
  
  //Also tested with
  //DataSource.Factory dataSourceFactory = new DefaultHttpDataSourceFactory(Util.getUserAgent(this, getString(R.string.app_name)));
  
  
  MediaSource videoSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
          .createMediaSource(mUri);
  
  player.prepare(videoSource);
  player.setPlayWhenReady(true);
  player.addListener(this);
  </code></pre>
  <p>Also tried applying-</p>
  <pre><code>DefaultExtractorsFactory extractorsFactory = new DefaultExtractorsFactory();
  extractorsFactory.setConstantBitrateSeekingEnabled(true);
  
  MediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)
              .setExtractorsFactory(extractorsFactory)
              .createMediaSource(mUri);
  </code></pre>
  <p>Is there any option to enable seeking for large <code>.mkv</code> video files? Any other libraries will also be appreciated.</p>
  <p><strong>Update</strong></p>
  <p>If I try to seek programmatically with <code>player.seekTo(15000);</code> video starts from beginning again.</p>