title: How to make range request for any portion of a media fragment?
body: <p>If we wanted to make an <code>HTTP/1.0</code> or <code>HTTP/1.1</code> request, for example bytes 20000 to 100000 or seconds 20 through 35 seconds of a given media resource for example, <code>.webm</code> or <code>.ogg</code> audio or <code>.mp4</code> video, where the response would be a discrete media fragment capable of playback without other portions of the media resource, how would we achieve this?</p>
  
  <p>For example </p>
  
  <pre><code>let headers = new Headers();
  let range = 1024 * 1024;
  headers.append("Range", "bytes=0-" + range); 
  let request = new Request(url, {headers:headers});
  fetch(request)
  .then(response =&gt; response.blob())
  .then(data =&gt; audio.src = URL.createObjectURL(data));
  </code></pre>
  
  <p>loads and media plays</p>
  
  <pre><code>let headers = new Headers();
  let range = 1024 * 1024;
  headers.append("Range", "bytes=" + range + "-" + range * 2);
  let request = new Request(url, {headers:headers});
  fetch(request)
  .then(response =&gt; response.blob())
  .then(data =&gt; audio.src = URL.createObjectURL(data));
  </code></pre>
  
  <p>logs successful <code>200</code> and <code>206</code> response statuses, though does not render media playback at <code>&lt;audio&gt;</code> element.</p>
  
  <p>How to create a range request for a given media,  which returns only the requested range of the resource as a discrete resource capable of playback without other portions of the media, where requested media fragment can be any discrete portion of the media resource?</p>