Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getMimeType() shoulnd’t expect a semicolon in the type attribute of every <source> element #1

Closed
mathiasbynens opened this issue Jul 10, 2010 · 1 comment

Comments

@mathiasbynens
Copy link

The demo uses the following HTML:

<video poster="demo/poster.jpg" width="352" height="264" controls preload>
 <source src="demo/video.ogv" type='video/ogg; codecs="theora, vorbis"'></source>
 <source src="demo/video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'></source>
</video>

(By the way, you shouldn’t close the source element.) The codecs part is optional and can be omitted in HTML5:

<video poster="demo/poster.jpg" width="352" height="264" controls preload>
 <source src="demo/video.ogv" type="video/ogg">
 <source src="demo/video.mp4" type="video/mp4">
</video>

However, this causes html5media to break. The getMimeType() function relies on the semicolon (;) being there in the type attribute.

@etianen
Copy link
Owner

etianen commented Jul 12, 2010

I've pushed a fix up to master, and will do a mini-release shortly. Oops.

In terms of closing the source element - I know the HTML5 specification doesn't like it, but some of the old browsers need it to be there else they completely fail. I did a load of testing when I started the project, and the syntax I use for the video tags, however clunky, is the only one that worked across the board. I wish I'd made some notes about what failed under what circumstances, but I didn't. In this case, I think it was Opera that needed the closing source tag, but don't quote me on that.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants