Add HLS support detection to Modernizr.video #1317

Merged
merged 1 commit into from Apr 25, 2014

Projects

None yet

2 participants

@zeno
Contributor
zeno commented Apr 24, 2014

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

@patrickkettner patrickkettner and 1 other commented on an outdated diff Apr 24, 2014
feature-detects/video.js
@@ -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$/,'');
-
+
@patrickkettner
patrickkettner Apr 24, 2014 Member

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

@zeno
zeno Apr 24, 2014 Contributor

Done!

@patrickkettner
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!

@patrickkettner patrickkettner commented on the diff Apr 24, 2014
test/caniuse.html
@@ -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">
@patrickkettner
patrickkettner Apr 24, 2014 Member

why this change?

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

@patrickkettner
patrickkettner Apr 25, 2014 Member

thanks for the schoolin'!

@patrickkettner
Member

could you squish everything down to a single commit?

git rebase -i @~3

@zeno zeno 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
342f050
@zeno
Contributor
zeno commented Apr 25, 2014

Done!

@patrickkettner
Member

badabing badaboom

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment