[whatwg] HTMLMediaElement.preload and stalled event

To me, stalled implies that the UA is trying to receive stuff, but is
being stalled. So, my understanding is that the resource fetch
algorithm in [1] should include the word "unexpectedly" - that would
fix it. Then, if  no data has been received for more than 3 seconds,
the "stalled" event would be fired - and again in another 3 seconds
etc, until we time out with an error. But if the UA isn't expecting
data, such as in a suspended state for preload:none or
preload:metadata, the @readyState is HAVE_NONE or HAVE_METADATA, and
the events fired are emptied or loadedmetadata respectively - and
probably pause.

An alternative interpretation would be that stalled implies that
playback is stalled. But even then, it doesn't really make sense,
since we are not trying to play, but are still in pause state.

Cheers,
Silvia.

On Fri, Jul 23, 2010 at 1:25 PM, Chris Pearce <chris at pearce.org.nz> wrote:
> ?I am implementing HTMLMediaElement.preload in Firefox, and I have a
> question:
>
> Should we be periodically firing a "stalled" event at the media element
> while we've suspended download of a preload:none or preload:metadata media?
>
> In step 2 of the resource fetch algorithm [1], the spec says "If at any
> point the user agent has received no data for more than about three seconds,
> then queue a task to fire a simple event named stalled at the element." But
> the description of the "stalled" event [2] says "The user agent is trying to
> fetch media data, but data is unexpectedly not forthcoming." The later
> description seems to imply that we only send "stalled" events when we
> unexpectedly stop receiving data, but the resource fetch algorithm indicates
> we should send "stalled" events if we stop receiving data for any reason,
> even if we suspend the download, and thus expect to not receive data.
>
> If we should send the stalled events, we should update the description of
> the stalled event at [2] to reflect that.
>
> Thanks,
> Chris Pearce.
>
> [1]
> http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#concept-media-load-resource
> [2]
> http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#event-media-stalled
>

Received on Thursday, 22 July 2010 22:11:39 UTC