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

Add HLS support detection to Modernizr.video #1317

Merged
merged 1 commit into from
Apr 25, 2014

Conversation

zeno
Copy link
Contributor

@zeno zeno commented Apr 24, 2014

Chrome Android 4.4 -> "probably"
Safari iOS -> "probably"
Safari OSX -> "probably"

@@ -52,7 +52,8 @@ define(['Modernizr', 'createElement'], function( Modernizr, createElement ) {
bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,'');

bool.vp9 = elem.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,'');


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like theres some leading whitesapce - can you strip it out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@patrickkettner
Copy link
Member

thanks @zeno ! looks good, other than the whitespace, strip that out, then squish it down to a single commit, and we will get in in straight away!

@@ -677,7 +677,7 @@

<div class="test_wrap"><h3>Interact</h3><div id="video1" class="interact"></div><video width="160" height="120" controls="">
<source src="video.mp4" type="video/mp4">
<source src="video.ogv" type="video/ogv">
<source src="video.ogv" type="video/ogg">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because "video/ogv" is the wrong MIME type for OGG videos. It's a common mistake: since the file extension is .ogv we often tend to use video/ogv for the content type, but that's wrong, it must be video/ogg. You can test it on browsers that support the ogg format (like Firefox or Chrome): if you execute videoElement.canPlayType('video/ogg') you'll get "mabye" or "probably", but if you execute videoElement.canPlayType('video/ogv') you'll get "" (empty string). It's not a big deal and it's not related to my HLS detect patch, it's just a mini typo I saw...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the schoolin'!

@patrickkettner
Copy link
Member

could you squish everything down to a single commit?

git rebase -i @~3

Chrome Android 4.4 -> "probably"
Safari iOS -> "probably"
Safari OSX -> "probably"

Fix typo in mime type for ogg video

Strip out some leading whitespace
@zeno
Copy link
Contributor Author

zeno commented Apr 25, 2014

Done!

@patrickkettner
Copy link
Member

badabing badaboom

patrickkettner added a commit that referenced this pull request Apr 25, 2014
Add HLS support detection to Modernizr.video
@patrickkettner patrickkettner merged commit 278b126 into Modernizr:master Apr 25, 2014
@zeno zeno deleted the hls-detect branch May 5, 2014 14:07
@stucox stucox mentioned this pull request May 21, 2014
patrickkettner added a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015
Add HLS support detection to Modernizr.video
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

Successfully merging this pull request may close these issues.

2 participants