From 27c53c8f97b50890acd0f9bffad8340886d4be23 Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Mon, 23 Oct 2023 13:42:24 -0700 Subject: [PATCH 1/5] Editorial: remove redundant tables --- media-source-respec.html | 119 +++++---------------------------------- 1 file changed, 14 insertions(+), 105 deletions(-) diff --git a/media-source-respec.html b/media-source-respec.html index a7f744f..65394dd 100644 --- a/media-source-respec.html +++ b/media-source-respec.html @@ -452,7 +452,6 @@

Attributes

  • Add the new object to {{MediaSource/sourceBuffers}} and [=queue a task=] to [=fire an event=] named {{addsourcebuffer}} at {{MediaSource/sourceBuffers}}.
  • Return the new object.
  • -
    ParameterTypeNullableOptionalDescription
    |type|{{DOMString}}
    Return type: SourceBuffer
    removeSourceBuffer

    Removes a {{SourceBuffer}} from {{MediaSource/sourceBuffers}}.

    @@ -611,8 +610,6 @@

    Attributes

    {{removesourcebuffer}} at the SourceBufferList returned by {{MediaSource/sourceBuffers}}.
  • Destroy all resources for |sourceBuffer|.
  • -
    ParameterTypeNullableOptionalDescription
    |sourceBuffer|{{SourceBuffer}}
    Return type: {{undefined}}
    endOfStream

    Signals the end of the stream.

    @@ -622,11 +619,11 @@

    Attributes

  • If the {{SourceBuffer/updating}} attribute equals true on any SourceBuffer in {{MediaSource/sourceBuffers}}, then throw an {{InvalidStateError}} exception and abort these steps.
  • Run the [=end of stream=] algorithm with the error parameter set to |error:EndOfStreamError|.
  • -
    ParameterTypeNullableOptionalDescription
    |error|{{EndOfStreamError}}
    Return type: {{undefined}}
    -
    setLiveSeekableRange
    - +

    + The |start| of the range, in seconds measured from [=presentation start time=]. While set, and if {{MediaSource/duration}} equals positive Infinity, {{HTMLMediaElement}}.{{HTMLMediaElement/seekable}} will return a non-empty TimeRanges object with a lowest range start timestamp no greater than |start|. + The |end| of range, in seconds measured from [=presentation start time=]. While set, and if {{MediaSource/duration}} equals positive Infinity, {{HTMLMediaElement}}.{{HTMLMediaElement/seekable}} will return a non-empty TimeRanges object with a highest range end timestamp no less than |end|. +

    Updates {{MediaSource/[[live seekable range]]}} that is used in HTMLMediaElement Extensions to modify {{HTMLMediaElement}}.{{HTMLMediaElement/seekable}} behavior.

    @@ -636,36 +633,7 @@

    Attributes

  • Set {{MediaSource/[[live seekable range]]}} to be a new containing a single range whose start position is |start| and end position is |end|.
  • - - - - - - - - - - - - - - - - - - - - - - - - -
    ParameterTypeNullableOptionalDescription
    |start|{{double}}The start of the range, in seconds measured from [=presentation start time=]. While set, and if {{MediaSource/duration}} equals positive Infinity, {{HTMLMediaElement}}.{{HTMLMediaElement/seekable}} will return a non-empty TimeRanges object with a lowest range start timestamp no greater than |start|.
    |end|{{double}}The end of range, in seconds measured from [=presentation start time=]. While set, and if {{MediaSource/duration}} equals positive Infinity, {{HTMLMediaElement}}.{{HTMLMediaElement/seekable}} will return a non-empty TimeRanges object with a highest range end timestamp no less than |end|.
    -
    Return type: {{undefined}}
    clearLiveSeekableRange
    +
    clearLiveSeekableRange

    Updates {{MediaSource/[[live seekable range]]}} that is used in HTMLMediaElement Extensions to modify {{HTMLMediaElement}}.{{HTMLMediaElement/seekable}} behavior.

    @@ -675,7 +643,7 @@

    Attributes

  • If {{MediaSource/[[live seekable range]]}} contains a range, then set {{MediaSource/[[live seekable range]]}} to be a new empty {{TimeRanges}} object.
  • -
    No parameters.
    Return type: {{undefined}}
    +
    isTypeSupported, static

    Check to see whether the MediaSource is capable of creating SourceBuffer objects for the specified MIME type.

    @@ -694,7 +662,6 @@

    Attributes

    This method returning true implies that HTMLMediaElement.canPlayType() will return "maybe" or "probably" since it does not make sense for a MediaSource to support a type the HTMLMediaElement knows it cannot play.

    -
    ParameterTypeNullableOptionalDescription
    |type|{{DOMString}}
    Return type: {{boolean}}
    @@ -1468,7 +1435,7 @@

    SourceBuffer Object

  • [=Queue a task=] to [=fire an event=] named {{updatestart}} at this SourceBuffer object.
  • Asynchronously run the [=buffer append=] algorithm.
  • -
    ParameterTypeNullableOptionalDescription
    |data|{{BufferSource}}
    Return type: {{undefined}}
    abort
    +

    Aborts the current segment and resets the segment parser.

      @@ -1487,7 +1454,7 @@

      SourceBuffer Object

    1. Set {{SourceBuffer/appendWindowStart}} to the [=presentation start time=].
    2. Set {{SourceBuffer/appendWindowEnd}} to positive Infinity.
    -
    No parameters.
    Return type: {{undefined}}
    +
    changeType

    Changes the MIME type associated with this object. Subsequent {{SourceBuffer/appendBuffer()}} calls will expect the newly appended bytes to conform to the new type.

      @@ -1521,27 +1488,13 @@

      SourceBuffer Object

    1. Set the {{SourceBuffer/[[pending initialization segment for changeType flag]]}} on this {{SourceBuffer}} object to true.
    - - - - - - - - - - - - - - - - - -
    ParameterTypeNullableOptionalDescription
    |type|{{DOMString}}
    -
    Return type: {{undefined}}
    +
    remove
    -

    Removes media for a specific time range.

    +

    + Removes media for a specific time range. + The |start| of the removal range, in seconds measured from [=presentation start time=] + The |end| of the removal range, in seconds measured from [=presentation start time=]. +

    1. If this object has been removed from the {{MediaSource/sourceBuffers}} attribute of the [=parent media source=] then throw an {{InvalidStateError}} exception and abort these steps.
    2. If the {{SourceBuffer/updating}} attribute equals true, then throw an {{InvalidStateError}} exception and abort these steps.
    3. @@ -1558,37 +1511,6 @@

      SourceBuffer Object

    4. Run the [=range removal=] algorithm with |start| and |end| as the start and end of the removal range.
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    ParameterTypeNullableOptionalDescription
    |start|{{double}}The start of the removal range, in seconds measured from [=presentation start time=].
    |end|{{unrestricted double}}The end of the removal range, in seconds measured from [=presentation start time=].
    -
    Return type: {{undefined}}
    @@ -2682,19 +2604,6 @@

    Methods

  • If |index:unsigned long| is greater than or equal to the {{SourceBufferList/length}} attribute then return undefined and abort these steps.
  • Return the |index|'th SourceBuffer object in the list.
  • - - - - - - - - - - - -
    ParameterTypeNullableOptionalDescription
    |index|{{unsigned long}}
    -
    Return type: {{SourceBuffer}}
    From d724a1d58862a89234dffd72617b50abb3198fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Fri, 8 Dec 2023 17:27:38 +1100 Subject: [PATCH 2/5] Update media-source-respec.html Co-authored-by: Matt Wolenetz --- media-source-respec.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/media-source-respec.html b/media-source-respec.html index 65394dd..db1d2f1 100644 --- a/media-source-respec.html +++ b/media-source-respec.html @@ -1436,6 +1436,8 @@

    SourceBuffer Object

  • Asynchronously run the [=buffer append=] algorithm.
  • +
    abort
    +

    Aborts the current segment and resets the segment parser.

      From 5304ed6d35f23189f8057adfda11c479a72263d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Fri, 8 Dec 2023 17:28:16 +1100 Subject: [PATCH 3/5] Update media-source-respec.html --- media-source-respec.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media-source-respec.html b/media-source-respec.html index db1d2f1..e483262 100644 --- a/media-source-respec.html +++ b/media-source-respec.html @@ -1436,7 +1436,7 @@

      SourceBuffer Object

    1. Asynchronously run the [=buffer append=] algorithm.
    -
    abort
    +
    abort

    Aborts the current segment and resets the segment parser.

    From 04c8e30465cf24004019bbc4cc328e6c3e4db1cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Fri, 8 Dec 2023 17:32:08 +1100 Subject: [PATCH 4/5] Update media-source-respec.html Co-authored-by: Matt Wolenetz --- media-source-respec.html | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/media-source-respec.html b/media-source-respec.html index e483262..7098c6b 100644 --- a/media-source-respec.html +++ b/media-source-respec.html @@ -620,13 +620,24 @@

    Attributes

  • Run the [=end of stream=] algorithm with the error parameter set to |error:EndOfStreamError|.
  • setLiveSeekableRange
    +

    Updates {{MediaSource/[[live seekable range]]}} that is used in + [[[#htmlmediaelement-extensions]]] to modify + {{HTMLMediaElement}}/{{HTMLMediaElement/seekable}} behavior.

    - The |start| of the range, in seconds measured from [=presentation start time=]. While set, and if {{MediaSource/duration}} equals positive Infinity, {{HTMLMediaElement}}.{{HTMLMediaElement/seekable}} will return a non-empty TimeRanges object with a lowest range start timestamp no greater than |start|. - The |end| of range, in seconds measured from [=presentation start time=]. While set, and if {{MediaSource/duration}} equals positive Infinity, {{HTMLMediaElement}}.{{HTMLMediaElement/seekable}} will return a non-empty TimeRanges object with a highest range end timestamp no less than |end|. + The |start| of the range, in seconds measured from [=presentation start time=]. + The |end| of range, in seconds measured from [=presentation start time=].

    -

    Updates {{MediaSource/[[live seekable range]]}} that is used in - HTMLMediaElement Extensions to modify - {{HTMLMediaElement}}.{{HTMLMediaElement/seekable}} behavior.

    +

    + HTMLMediaElement Extensions uses + {{MediaSource/[[live seekable range]]}}, if not empty and if + {{MediaSource/duration}} is positive infinity, to return a {{TimeRanges}} + object with a lowest range start timestamp no greater than |start| and a highest + range end timestamp no less than |end|. If this is a worker {{MediaSource}}, + cross-context communication latency will delay the effect of any duration or + live seekable range updates on + {{HTMLMediaElement}}'s {{HTMLMediaElement/seekable}} behavior. +

    +
    1. If the {{MediaSource/readyState}} attribute is not {{ReadyState/""open""}} then throw an {{InvalidStateError}} exception and abort these steps.
    2. If |start:double| is negative or greater than |end:double|, then throw a {{TypeError}} exception and abort these steps.
    3. From 9f61f9ac1dd73b100dde06c76913717597efabd1 Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Thu, 21 Dec 2023 11:38:06 +1100 Subject: [PATCH 5/5] fix markup --- media-source-respec.html | 1 + 1 file changed, 1 insertion(+) diff --git a/media-source-respec.html b/media-source-respec.html index 5c31810..bd9ce23 100644 --- a/media-source-respec.html +++ b/media-source-respec.html @@ -571,6 +571,7 @@

      removeSourceBuffer() method

      {{removesourcebuffer}} at the SourceBufferList returned by {{MediaSource/sourceBuffers}}.
    4. Destroy all resources for |sourceBuffer|.
    +

    endOfStream() method

    Signals the end of the stream.