[whatwg] Video metadata attributes clarification

Matthew Gregan kinetik at flim.org
Mon Nov 24 18:12:20 PST 2008


Hi,

I'm seeking clarification on when the videoWidth and videoHeight attributes
are expected to become valid.  Actually it'd probably be useful to have all
of the "metadata attributes" listed explicitly somewhere so that it's clear
exactly what is expected to be valid when readyState is HAVE_METADATA.

Looking at section 4.8.7, the discussion of videoWidth says: "If no video
data is available, then the attributes must return 0."  And the definition
of "no video data" (mentioned a little later in the same section): "When no
video data is available (the element's readyState is either HAVE_NOTHING or
HAVE_METADATA)".

Based on this, it seems like videoWidth and videoHeight should become valid
at the time readyState reaches HAVE_SOME_DATA.

However, the load algorithm in section 4.8.10.5 says, when discussing
readyState reaching HAVE_METADATA (in step 11.4) says: "the duration of the
media resource, its dimensions, and other metadata".  And just below that,
at step 3: "A number of attributes, including duration, buffered, and
played, become available".

I'm not clear if "dimensions" here refer to videoWidth and videoHeight, or
the "dimension attributes" discussed in section 4.8.17.  It seems that the
latter would depend on the former anyway.

In the lists of readyStates, for HAVE_METADATA, it says "the metadata
attributes are initialized (e.g. the length is known)".

Also, as mentioned, it'd be useful to have an explicit list of the "metadata
attributes" that become available at that time.

Cheers,
-mjg
-- 
Matthew Gregan                     |/
                                  /|                    kinetik at flim.org



More information about the whatwg mailing list