W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] HTML5 video <source> dimensions and bitrate

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 10 Aug 2010 10:57:34 -0700
Message-ID: <AANLkTimHP8jxxPu0POCUU68nNYj9Te0AOrFT=V_s1i8N@mail.gmail.com>
On Tue, Aug 10, 2010 at 9:44 AM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
> It *appears* that the minimum you're asking for is some way to include
> the bitrate/etc. information in the <source> element so that you can
> switch between them in js, right? ?You're not trying to add something
> that will cause changed browser behavior?
> In that case, your solution already exists - use the data-*
> attributes. ?<source src=foo data-jw-bitrate=2> works just fine. ?In
> existing browsers you can access the attribute with
> elem.getAttribute('data-jw-bitrate'), and in future browsers it'll be
> elem.data['jw-bitrate'].

Argh, sorry, memory barfed on me this morning.  In future browsers
it'll be elem.dataset.jwBitrate (hyphenated data-* names are
automatically converted to camelcase for easy accessing).

Received on Tuesday, 10 August 2010 10:57:34 UTC

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