W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2008

[whatwg] media elements: Relative seeking

From: Calogero Alex Baldacchino <alex.baldacchino@email.it>
Date: Mon, 24 Nov 2008 23:21:56 +0100
Message-ID: <fc14f8d5c70afba90d759435d1a64ca0@>
--------- Original Message --------

 Da: "Eric Carlson" &lt;eric.carlson at apple.com&gt;

 To: "Silvia Pfeiffer" &lt;silviapfeiffer1 at gmail.com&gt;

 Cc: "WHAT Working Group" &lt;whatwg at lists.whatwg.org&gt;, "Maik Merten"
&lt;maikmerten at googlemail.com&gt;

 Oggetto: Re: [whatwg] media elements: Relative seeking

 Data: 24/11/08 03:17

&gt; Silvia -


&gt; On Nov 23, 2008, at 1:40 PM, Silvia Pfeiffer wrote:


&gt;&gt; I don't see addition of a duration attribute as much of a problem.

&gt;&gt; have width and height for images, and sizes for fonts, too, and web

&gt;&gt; developers have learnt how to deal with these in various entities

&gt;&gt; em, pt). I would not have a problem giving web developers the

&gt;&gt; opportunity to report the real duration of a video in an attribute

&gt;&gt; either bytes or seconds (might be better called: length), which

&gt;&gt; allow a renderer to display an accurate timeline. It is help for a

&gt;&gt; display mechanism just as width and height are.


&gt; Those attributes are different because they change the presentation

&gt; of the element: image width and height are the rendered width and

&gt; height, font-size controls fond rendering size, etc. In order for a

&gt; duration attribute to be equivalent we would need for it to limit the

&gt; amount of the file played (like the now-removed 'end' attribute did).


Well, the length attribute could be an indication about such limit and could
accept a generic value, such as 'unknown' (or '0', with the same meaning -
just to have only numerical values) to indicate an endless stream (i.e. a
realtime iptv): in such a case, any seeking operation could be either
prohibited or just related to the amount of yet played content which is
eventually present in a local cache.

&gt;&gt; In case of contradiction between the attribute and the actual

&gt;&gt; length, a renderer can still override the length attribute at the

&gt;&gt; the real length is known. In case of contradiction between the

&gt;&gt; attribute and the estimated length of a video, the renderer should

&gt;&gt; make a call based on the probability of the estimate being correct.


&gt; In the case of a file with video or VBR audio the true duration

&gt; literally isn't actually known until *every* frame has been examined.


&gt; When would you have the UA decide to switch from the attribute to

&gt; the to the real duration?

I guess the U.A. could avail of an external codec, which could provide
facilities to estimate the real duration: in this case everything would be
as easy as just demanding the averaging an estimation to the codec, and
getting the real/estimated duration as the result of a callback.

&gt; What would you have the UA do if the user seeks to time 90 seconds when

&gt; attribute says a file is 100 seconds long, but the file actually has a

&gt; duration of 80?



Nothing special, according to me. Just update any visual time indicator,
both for total and current time, and convert the previous seek value to a
relative, percentage one, to normalize the requested position in respect to
the real duration. That is, let's just switch from absolute to relative
seeking as needed, it shouldn't be so difficoult, after all.



 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 CheBanca! La prima banca che ti d? gli interessi in anticipo.
Fino al 4,70% sul Conto Deposito, zero spese e interessi subito. Aprilo!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7916&d=20081124

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20081124/673521dd/attachment.htm>
Received on Monday, 24 November 2008 14:21:56 UTC

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