Remove supportsNativeHls
The video.js tech selection now manages whether the HLS polyfill is used or not, so we don't need to detect HLS support in the project itself.
Showing
2 changed files
with
0 additions
and
28 deletions
... | @@ -507,23 +507,6 @@ videojs.Hls.canPlaySource = function(srcObj) { | ... | @@ -507,23 +507,6 @@ videojs.Hls.canPlaySource = function(srcObj) { |
507 | return mpegurlRE.test(srcObj.type) || videojs.Flash.canPlaySource.call(this, srcObj); | 507 | return mpegurlRE.test(srcObj.type) || videojs.Flash.canPlaySource.call(this, srcObj); |
508 | }; | 508 | }; |
509 | 509 | ||
510 | videojs.Hls.supportsNativeHls = (function() { | ||
511 | var | ||
512 | video = document.createElement('video'), | ||
513 | xMpegUrl, | ||
514 | vndMpeg; | ||
515 | |||
516 | // native HLS is definitely not supported if HTML5 video isn't | ||
517 | if (!videojs.Html5.isSupported()) { | ||
518 | return false; | ||
519 | } | ||
520 | |||
521 | xMpegUrl = video.canPlayType('application/x-mpegURL'); | ||
522 | vndMpeg = video.canPlayType('application/vnd.apple.mpegURL'); | ||
523 | return (/probably|maybe/).test(xMpegUrl) || | ||
524 | (/probably|maybe/).test(vndMpeg); | ||
525 | })(); | ||
526 | |||
527 | /** | 510 | /** |
528 | * Creates and sends an XMLHttpRequest. | 511 | * Creates and sends an XMLHttpRequest. |
529 | * @param options {string | object} if this argument is a string, it | 512 | * @param options {string | object} if this argument is a string, it | ... | ... |
... | @@ -947,17 +947,6 @@ test('segment 500 should trigger MEDIA_ERR_ABORTED', function () { | ... | @@ -947,17 +947,6 @@ test('segment 500 should trigger MEDIA_ERR_ABORTED', function () { |
947 | equal(4, player.hls.error.code, 'Player error code should be set to MediaError.MEDIA_ERR_ABORTED'); | 947 | equal(4, player.hls.error.code, 'Player error code should be set to MediaError.MEDIA_ERR_ABORTED'); |
948 | }); | 948 | }); |
949 | 949 | ||
950 | test('has no effect if native HLS is available', function() { | ||
951 | videojs.Hls.supportsNativeHls = true; | ||
952 | player.src({ | ||
953 | src: 'http://example.com/manifest/master.m3u8', | ||
954 | type: 'application/vnd.apple.mpegurl' | ||
955 | }); | ||
956 | |||
957 | ok(!(player.currentSrc() in videojs.mediaSources), | ||
958 | 'no media source was opened'); | ||
959 | }); | ||
960 | |||
961 | test('duration is Infinity for live playlists', function() { | 950 | test('duration is Infinity for live playlists', function() { |
962 | player.src({ | 951 | player.src({ |
963 | src: 'http://example.com/manifest/missingEndlist.m3u8', | 952 | src: 'http://example.com/manifest/missingEndlist.m3u8', | ... | ... |
-
Please register or sign in to post a comment