W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2008

ProgressEvent unification / loaded attribute / "stalled" event

From: Philip Jägenstedt <philipj@opera.com>
Date: Thu, 26 Jun 2008 18:56:29 +0700
To: public-webapps@w3.org
Message-Id: <1214481389.10775.120.camel@localhost>

Hi all!

I'm working on HTMLMediaElement (http://www.w3.org/html/wg/html5/#media)
which I assume will eventually depend on and refer to


Is the intention that ProgressEventbe be used for the standard
error/abort/load events on HTMLDocument? If that isn't the case, we
would have two events with the same name and namespace. What would
document.addEventListener("load",...) listen for? An artificial
ProgressEvent can be created with document.createEvent("ProgressEvent"),
but should it no longer be possible to create the error/abort/load
events with document.createEvent("HTMLEvent")? 

I think many assume that event names are actually unique, anything else
is asking for trouble. This may ultimately be a question for the HTML
WG, but has any discussion taken place in the WebApps WG?


The definition of the loaded attribute seems to have been written with
linear progress in mind -- it "specifies the number of bytes transferred
since the beginning of the operation." Consider a large media file of
size 1000 MB where the first 900 MB are played twice (by the user
seeking to the beginning halfway through). 1800 MB will be transferred
if the user agent doesn't cache files that large, which is probably not
the intented result. Script authors would expect that

It would be nice if the loaded attribute were consistent with
(http://www.w3.org/html/wg/html5/#bufferedbytes) so I would suggest
this wording instead:

*Specifies the number of bytes currently loaded.* This refers to the
content, excluding headers and overhead from the transaction, and where
there is a content-encoding or transfer-encoding refers to the number of
bytes to be transferred, i.e. with the relevant encodings applied.

Double transfer due to insufficient cache might be considered overhead,
otherwise an extra note about that might be appropriate.


HTMLMediaElement uses a "stalled" event of type ProgressEvent
(http://www.w3.org/html/wg/html5/#stalled) which is fired if no data is
received for about 3 seconds. I'd like to see this added to Event

Description: The operation is unexpectedly not progressing
How often: zero or more
When: May be dispatched zero or more times after a loadstart event,
before any error, abort or load event is dispatched

I don't think it's appropriate to specify how long a time of
non-progress constitutes a stall as that might vary across different
contexts. Since it is OK to never fire the event, its possible it will
only be used in the HTML 5 spec though.


There are a few links/references which need fixing:

Latest Editor's version:
is 404

Maybe http://msdn.microsoft.com/en-us/library/cc197058(VS.85).aspx
instead, can't find a permalink.

[WPE] The progress element proposed by WHAT-WG

Was this ever an element? In any case, that link now refers to the event
progress of type ProgressEvent. It might be better to find an old link
or simply link to http://www.w3.org/html/wg/html5/#mediaevents

Philip Jägenstedt
Opera Software

Philip Jägenstedt
Opera Software
Received on Thursday, 26 June 2008 11:57:13 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:10 UTC