diff --git a/html5-common b/html5-common index 97a23140..3416191b 160000 --- a/html5-common +++ b/html5-common @@ -1 +1 @@ -Subproject commit 97a231407b0add86be573248eaff2107843ca743 +Subproject commit 3416191b771fb85791d4448c59e477087a49d3a3 diff --git a/src/main/js/main_html5.js b/src/main/js/main_html5.js index d3bec273..60e3c2b9 100644 --- a/src/main/js/main_html5.js +++ b/src/main/js/main_html5.js @@ -39,6 +39,14 @@ require("../../../html5-common/js/utils/environment.js"); list.push(OO.VIDEO.ENCODING.MP4); } + if (!!videoElement.canPlayType("audio/ogg")) { + list.push(OO.VIDEO.ENCODING.OGG); + } + + if (!!videoElement.canPlayType("audio/x-m4a")) { + list.push(OO.VIDEO.ENCODING.M4A); + } + if (!!videoElement.canPlayType("video/webm")) { list.push(OO.VIDEO.ENCODING.WEBM); } @@ -52,6 +60,7 @@ require("../../../html5-common/js/utils/environment.js"); list.push(OO.VIDEO.ENCODING.HLS); list.push(OO.VIDEO.ENCODING.AKAMAI_HD2_VOD_HLS); list.push(OO.VIDEO.ENCODING.AKAMAI_HD2_HLS); + list.push(OO.VIDEO.ENCODING.AUDIO_ONLY_HLS); } // Sony OperaTV supports HLS but doesn't properly report it so we are forcing it here @@ -59,9 +68,10 @@ require("../../../html5-common/js/utils/environment.js"); list.push(OO.VIDEO.ENCODING.HLS); list.push(OO.VIDEO.ENCODING.AKAMAI_HD2_VOD_HLS); list.push(OO.VIDEO.ENCODING.AKAMAI_HD2_HLS); + list.push(OO.VIDEO.ENCODING.AUDIO_ONLY_HLS); + } } - return list; }; this.encodings = getSupportedEncodings(); @@ -326,7 +336,8 @@ require("../../../html5-common/js/utils/environment.js"); isM3u8 = (encoding == OO.VIDEO.ENCODING.HLS || encoding == OO.VIDEO.ENCODING.AKAMAI_HD2_VOD_HLS || - encoding == OO.VIDEO.ENCODING.AKAMAI_HD2_HLS + encoding == OO.VIDEO.ENCODING.AKAMAI_HD2_HLS || + encoding == OO.VIDEO.ENCODING.AUDIO_ONLY_HLS ); isLive = live; urlChanged = true; diff --git a/tests/unit/main_html5/factory-tests.js b/tests/unit/main_html5/factory-tests.js index 63d2b5d5..c8eac588 100644 --- a/tests/unit/main_html5/factory-tests.js +++ b/tests/unit/main_html5/factory-tests.js @@ -37,7 +37,7 @@ describe('main_html5 factory tests', function () { it('should provide a list of supported encodings', function(){ // This is controlled by document.createElement("video").canPlayType(type); - expect(pluginFactory.encodings).to.eql([OO.VIDEO.ENCODING.MP4, OO.VIDEO.ENCODING.WEBM, OO.VIDEO.ENCODING.HLS, OO.VIDEO.ENCODING.AKAMAI_HD2_VOD_HLS, OO.VIDEO.ENCODING.AKAMAI_HD2_HLS]); + expect(pluginFactory.encodings).to.eql([OO.VIDEO.ENCODING.MP4, OO.VIDEO.ENCODING.OGG, OO.VIDEO.ENCODING.M4A, OO.VIDEO.ENCODING.WEBM, OO.VIDEO.ENCODING.HLS, OO.VIDEO.ENCODING.AKAMAI_HD2_VOD_HLS, OO.VIDEO.ENCODING.AKAMAI_HD2_HLS, OO.VIDEO.ENCODING.AUDIO_ONLY_HLS]); }); it('should provide a list of supported features', function(){