1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-13 10:32:26 +02:00

ignore: Prevent test failures in IE8 (#3891)

This commit is contained in:
Pat O'Neill 2016-12-23 14:03:58 -05:00 committed by Gary Katsevman
parent ac0b03f2f7
commit 26d4e7b0bf
2 changed files with 8 additions and 4 deletions

View File

@ -1030,9 +1030,6 @@ const mpegurlRE = /^application\/(?:x-|vnd\.apple\.)mpegurl/i;
const mp4RE = /^video\/mp4/i;
Html5.patchCanPlayType = function() {
if (!canPlayType) {
return;
}
// Android 4.0 and above can play HLS to some extent but it reports being unable to do so
if (browser.ANDROID_VERSION >= 4.0 && !browser.IS_FIREFOX) {

View File

@ -61,7 +61,14 @@ function classRegExp(className) {
* @return {Boolean}
*/
export function isReal() {
return document === window.document && typeof document.createElement === 'function';
return (
// Both document and window will never be undefined thanks to `global`.
document === window.document &&
// In IE < 9, DOM methods return "object" as their type, so all we can
// confidently check is that it exists.
typeof document.createElement !== 'undefined');
}
/**