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

Projects
None yet
2 participants
@zeno
Contributor

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$/,'');

This comment has been minimized.

@patrickkettner

patrickkettner Apr 24, 2014

Member

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

This comment has been minimized.

@zeno

zeno Apr 24, 2014

Contributor

Done!

@patrickkettner

This comment has been minimized.

Member

patrickkettner commented Apr 24, 2014

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">

This comment has been minimized.

@patrickkettner

patrickkettner Apr 24, 2014

Member

why this change?

This comment has been minimized.

@zeno

zeno Apr 24, 2014

Contributor

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...

This comment has been minimized.

@patrickkettner

patrickkettner Apr 25, 2014

Member

thanks for the schoolin'!

@patrickkettner

This comment has been minimized.

Member

patrickkettner commented Apr 25, 2014

could you squish everything down to a single commit?

git rebase -i @~3

Add HLS support detection
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

This comment has been minimized.

Contributor

zeno commented Apr 25, 2014

Done!

@patrickkettner

This comment has been minimized.

Member

patrickkettner commented Apr 25, 2014

badabing badaboom

patrickkettner added a commit that referenced this pull request Apr 25, 2014

Merge pull request #1317 from zeno/hls-detect
Add HLS support detection to Modernizr.video

@patrickkettner patrickkettner merged commit 278b126 into Modernizr:master Apr 25, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@zeno zeno deleted the zeno:hls-detect branch May 5, 2014

@stucox stucox referenced this pull request May 21, 2014

Closed

v3.0 release notes #805

patrickkettner added a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015

Merge pull request Modernizr#1317 from zeno/hls-detect
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