ca5e4ffe by David LaPalomento

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.
1 parent d1695461
......@@ -507,23 +507,6 @@ videojs.Hls.canPlaySource = function(srcObj) {
return mpegurlRE.test(srcObj.type) || videojs.Flash.canPlaySource.call(this, srcObj);
};
videojs.Hls.supportsNativeHls = (function() {
var
video = document.createElement('video'),
xMpegUrl,
vndMpeg;
// native HLS is definitely not supported if HTML5 video isn't
if (!videojs.Html5.isSupported()) {
return false;
}
xMpegUrl = video.canPlayType('application/x-mpegURL');
vndMpeg = video.canPlayType('application/vnd.apple.mpegURL');
return (/probably|maybe/).test(xMpegUrl) ||
(/probably|maybe/).test(vndMpeg);
})();
/**
* Creates and sends an XMLHttpRequest.
* @param options {string | object} if this argument is a string, it
......
......@@ -947,17 +947,6 @@ test('segment 500 should trigger MEDIA_ERR_ABORTED', function () {
equal(4, player.hls.error.code, 'Player error code should be set to MediaError.MEDIA_ERR_ABORTED');
});
test('has no effect if native HLS is available', function() {
videojs.Hls.supportsNativeHls = true;
player.src({
src: 'http://example.com/manifest/master.m3u8',
type: 'application/vnd.apple.mpegurl'
});
ok(!(player.currentSrc() in videojs.mediaSources),
'no media source was opened');
});
test('duration is Infinity for live playlists', function() {
player.src({
src: 'http://example.com/manifest/missingEndlist.m3u8',
......