<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>18666</bug_id>
          
          <creation_ts>2012-08-23 15:15:37 +0000</creation_ts>
          <short_desc>Define what HTMLMediaElement.seekable returns</short_desc>
          <delta_ts>2012-10-12 12:07:56 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>Media Source Extensions</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philip Jägenstedt">philipj</reporter>
          <assigned_to name="Adrian Bateman [MSFT]">adrianba</assigned_to>
          <cc>acolwell</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-media</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72609</commentid>
    <comment_count>0</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2012-08-23 15:15:37 +0000</bug_when>
    <thetext>http://dev.w3.org/html5/spec/media-elements.html#dom-media-seekable
http://dev.w3.org/html5/spec/media-elements.html#dom-media-seek

The HTMLMediaElement seek algorithm clamps the requested position to the closest seekable range, so anything outside the reported seekable ranges is impossible to seek to.

It&apos;s not defined in MSE how to report the seekable attribute and it&apos;s not clear that there&apos;s a good answer, since the browser isn&apos;t in a good position guess what ranges the application will be able to provide.

Possible solutions:

1. Expose [0, duration]. This is still broken because it&apos;s a complete lie for Infinite duration, and for implicit duration it makes it impossible to seek beyond the already appended data.

2. Expose no seekable ranges at all, and say that the clamping step of the seeking algorithm should be skipped for MSE. That works, but isn&apos;t exactly elegant.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73944</commentid>
    <comment_count>1</comment_count>
    <who name="Aaron Colwell (c)">acolwell</who>
    <bug_when>2012-09-15 00:36:19 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; http://dev.w3.org/html5/spec/media-elements.html#dom-media-seekable
&gt; http://dev.w3.org/html5/spec/media-elements.html#dom-media-seek
&gt; 
&gt; The HTMLMediaElement seek algorithm clamps the requested position to the
&gt; closest seekable range, so anything outside the reported seekable ranges is
&gt; impossible to seek to.
&gt; 
&gt; It&apos;s not defined in MSE how to report the seekable attribute and it&apos;s not clear
&gt; that there&apos;s a good answer, since the browser isn&apos;t in a good position guess
&gt; what ranges the application will be able to provide.
&gt; 
&gt; Possible solutions:
&gt; 
&gt; 1. Expose [0, duration]. This is still broken because it&apos;s a complete lie for
&gt; Infinite duration, and for implicit duration it makes it impossible to seek
&gt; beyond the already appended data.
&gt; 
&gt; 2. Expose no seekable ranges at all, and say that the clamping step of the
&gt; seeking algorithm should be skipped for MSE. That works, but isn&apos;t exactly
&gt; elegant.

I prefer option 1. I think in most cases it will be the right thing to do because the expectation is that the web application will append media for all portions of the timeline.

For implicit duration I think it is ok to prevent seeking beyond the appended data since the application hasn&apos;t given any indication that this should be allowed. If the application knows the true duration it can always explicitly set MediaSource.duration and then the seekable range would expand to that and seeking outside the appended region would be allowed.

In the case of Infinity perhaps we should use the last end time in SourceBuffer.buffered across all SourceBuffers since that appears to be the best way for the UA to guess about what sections of the media will be available. It isn&apos;t perfect, but it seems like the closest thing to what would happen in a live stream.

Seem reasonable?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73993</commentid>
    <comment_count>2</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2012-09-17 08:17:39 +0000</bug_when>
    <thetext>Yeah, this sounds OK. My main worry was that authors would fail to notice the restriction in the implicit case and not notice until on a slow network, but reconsidering I don&apos;t think that&apos;s a very realistic scenario.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75619</commentid>
    <comment_count>3</comment_count>
    <who name="Aaron Colwell (c)">acolwell</who>
    <bug_when>2012-10-08 19:52:57 +0000</bug_when>
    <thetext>Changes committed:
http://dvcs.w3.org/hg/html-media/rev/c3de559a1c37</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76091</commentid>
    <comment_count>4</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2012-10-12 12:07:56 +0000</bug_when>
    <thetext>http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#htmlmediaelement-attributes looks OK.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>