W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2009

[whatwg] Adding resourceless media to document causes error event

From: Calogero Alex Baldacchino <alex.baldacchino@email.it>
Date: Wed, 04 Feb 2009 05:51:12 +0100
Message-ID: <49891EC0.80503@email.it>
Chris Pearce ha scritto:
> I need to clarify something about the media load() algorithm [ 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#dom-media-load 
> ]
>
> My reading of the spec is that if you have a media element with no src 
> attribute or source element children (e.g. <video></video>) and you 
> insert it into a document, then the media load() algorithm will be 
> implicitly invoked, and because the list of potential media resources 
> is empty, that algorithm will immediately fall through to the "failure 
> step" (step 12), causing an error progress event to be dispatched to 
> the media element.
>
> My question is:
>
> Is is really necessary to invoke the load algorithm when adding a 
> media element with no src/sources to a document? Doing so just causes 
> an error progress event dispatch, and we've not exactly failed to load 
> anything, indeed, we've not even tried to load anything in this case.
>
>
> Thanks,
> Chris Pearce.

Maybe an attribute such as "enabled" (or "disabled") or "defer" or the 
alike could be helpful, so that any operations can be freezed/deferred 
whenever a DOM manipulation is needed, without caring of possible 
consequences (unless the video is being played, in which case I think 
that either manipulations should be avoided, and/or their effects 
ignored/deferred, or the playback should be explicitely stopped, e.g. by 
calling a stop() method, to force the immediate execution of a scheduled 
evaluation of new sources, eventually after the UA has asked the user 
for his permission -- I'd prefer this approach to any explicite 
invocation of the load() method, which could instead be a routine 
invoked by a task engine under certain conditions).

WBR, Alex
 
 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
 
 Sponsor:
 Blu American Express: gratuita a vita! 
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8615&d=4-2
Received on Tuesday, 3 February 2009 20:51:12 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:09 UTC