W3C home > Mailing lists > Public > public-html-media@w3.org > February 2013

[Bug 20952] New: Add an update complete event

From: <bugzilla@jessica.w3.org>
Date: Mon, 11 Feb 2013 17:07:59 +0000
To: public-html-media@w3.org
Message-ID: <bug-20952-5436@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20952

            Bug ID: 20952
           Summary: Add an update complete event
    Classification: Unclassified
           Product: HTML WG
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Media Source Extensions
          Assignee: adrianba@microsoft.com
          Reporter: adrianba@microsoft.com
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-media@w3.org

We should add an update complete event (maybe "update") on successful
completion of append or remove that fires before updateend. This is a common
pattern in Web APIs (see the Progress Events specification [1]). This is
necessary because we have abort and error events that fire before updateend
and, with the asynchronous nature of the API, we need an event signaling
success. Without this applications must keep track of abort and error events to
distinguish an updateend that occurs after one of these and an updateend that
occurred because the operation completed successfully.

One situation that we found that highlights this need is from the steps in the
abort() operation [2]. Consider the following: if(sb.updating) sb.abort();
Between the JavaScript checking the updating flag and calling abort() the
current operation might complete. This means that step 3 of the abort operation
will not fire since it is no longer updating. The updateend event will fire but
the abort event will not. To avoid applications keeping track of this, we
should make the following changes:

The segment parser loop [3] should add an additional step before step 9:
"Queue a task to fire a simple event named update at this SourceBuffer object."

The stream append loop [4] should add an additional step before step 12:
"Queue a task to fire a simple event named update at this SourceBuffer object."

The remove() method [5] should add an additional step before step 12:
"Queue a task to fire a simple event named update at this SourceBuffer object."

Add the "update" event to the Event Summary section [6].

[1]
http://www.w3.org/TR/progress-events/#suggested-names-for-events-using-the-progressevent-interface
[2]
https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#widl-SourceBuffer-abort-void
[3]
https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#sourcebuffer-segment-parser-loop
[4]
https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#sourcebuffer-stream-append-loop
[5]
https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#widl-SourceBuffer-remove-void-double-start-double-end
[6]
https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#sourcebuffer-events

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Monday, 11 February 2013 17:08:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 15:48:32 UTC