title: How to feed the video source based on time range?
body: <p>Standard HTML5 <code>video</code> element seems to work using <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests" rel="nofollow noreferrer">byte ranges</a>. The problem is that the server I'm using to serve the video content doesn't support byte ranges. It only supports time ranges (as it's based on ffmpeg). </p>
  
  <p>E.g. I can make a query(in seconds) such <code>http://example.com/myvideo.mkv?range=3.40-49</code> and it returns  video content from 3rd second point 40 ms to 49th second.</p>
  
  <p>Question: is it possible to feed the media source buffer using time ranges? How do I know what time ranges does the media buffer needs and when(e.g. if the client seeks using the progress bar)?</p>
  
  <p>I've checked several players such <a href="https://github.com/Dash-Industry-Forum/dash.js/wiki" rel="nofollow noreferrer">dash.js</a> but they all assume the server supports byte range so I can't use them.</p>
  
  <p>What I've tried so far:
  I was thinking to use timestampOffset to feed the array buffer with the correct bytes(time range based) but I don't know when the client seeks and at what position(in seconds). Additionally I think I should fill the range missed but timestampOffset provides only an offset/start point. How do I know the range so that I can avoid overwriting possible already cached/buffered content? </p>
  
  <p>I feel there are a lot of edge cases so I'm wondering if there is already a such player supporting time range instead of byte range. I basically just want to provide a <code>function (videoSourceBuffer, startTime, stopTime)</code> which fills <code>videoSourceBuffer</code> with the video content starting at <code>startTime</code> and stoping at <code>stopTime</code>.  </p>
  
  <pre><code>  var mediaSource = new MediaSource();
      mediaSource.addEventListener('sourceopen', function() {
          var sourceBuffer = mediaSource.addSourceBuffer('video/webm; codecs="vorbis,vp8"');
              sourceBuffer.timestampOffset = 0;
              sourceBuffer.appendBuffer(videoBinary);
      });
  </code></pre>