ProgressEvent unification / loaded attribute / "stalled" event

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
http://dev.w3.org/2006/webapi/progress/Progress.html

1:

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?

2:

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
loadedArg<=totalArg.

It would be nice if the loaded attribute were consistent with
HTMlMediaElement.bufferedBytes
(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.

3:

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
definitions.

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.

4:

There are a few links/references which need fixing:

Latest Editor's version:
http://www.w3.org/cvsweb/~checkout~/2006/webapi/progress/Progress.html
is 404

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/html/07b3e629-a558-4a0e-8307-ca922f56e00c.asp
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
http://www.whatwg.org/specs/web-apps/current-work/#progress0

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