This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9732 - Give more varied examples on the codecs parameter
Summary: Give more varied examples on the codecs parameter
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: LC
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 13:34 UTC by contributor
Modified: 2010-10-04 13:55 UTC (History)
6 users (show)

See Also:


Attachments

Description contributor 2010-05-14 13:34:01 UTC
Section: http://www.whatwg.org/specs/web-apps/current-work/#the-source-element

Comment:
Give more varied examples on the codecs parameter

Posted from: 213.236.208.46
Comment 1 Philip Jägenstedt 2010-05-14 13:38:10 UTC
We currently have examples which are all on the form <source src='video.ogv' type='video/ogg; codecs="theora, vorbis"'>

I've seen (but can't find a link now) people who like double-quotes rewrite this as type="video/ogg; codecs=&quot;theora, vorbis&quot;". What's worse, this gets copied to external JavaScript where HTML entities aren't expanded.

While HTML5 does not define how to parse the codecs parameter (no spec does AFAIK) I would like the spec to have at least some examples that don't use any quotes or spaces, e.g. type='video/ogg; codecs=theora,vorbis'. This is easier to read in my opinion. It should also warn about the fragility of both approaches:

* using quotes breaks when copying to script
* not using quotes breaks when adding a space
Comment 2 Chris Double 2010-05-14 14:33:20 UTC
(In reply to comment #1)
> While HTML5 does not define how to parse the codecs parameter (no spec does
> AFAIK) I would like the spec to have at least some examples that don't use any
> quotes or spaces, e.g. type='video/ogg; codecs=theora,vorbis'. This is easier
> to read in my opinion. It should also warn about the fragility of both
> approaches:

RFC 4281 defines how to parse the codec parameter AFAIK. It says the double quotes are required if there is more than one codec listed.
Comment 3 Philip Jägenstedt 2010-05-14 16:52:35 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > While HTML5 does not define how to parse the codecs parameter (no spec does
> > AFAIK) I would like the spec to have at least some examples that don't use any
> > quotes or spaces, e.g. type='video/ogg; codecs=theora,vorbis'. This is easier
> > to read in my opinion. It should also warn about the fragility of both
> > approaches:
> 
> RFC 4281 defines how to parse the codec parameter AFAIK. It says the double
> quotes are required if there is more than one codec listed.

Oh, I had no idea about this RFC, or I knew and forgot it. Does Gecko require the quotes to be present, so that suggesting people to not use them would break Firefox?
Comment 4 Simon Pieters 2010-05-14 20:47:41 UTC
javascript:alert(document.createElement('video').canPlayType('video/ogg;codecs=theora,vorbis'))

Gives 'probably' in Firefox.
Comment 5 Ian 'Hixie' Hickson 2010-08-24 23:48:08 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: Given that it's not allowed... (I do omit the quotes when it's allowed.)