mirror of
https://github.com/videojs/video.js.git
synced 2024-11-28 08:58:46 +02:00
test: run tests via rollup (#5601)
This commit is contained in:
parent
85ad44e13e
commit
4134a9734b
@ -7,12 +7,12 @@ const sh = require('shelljs');
|
||||
const files = sh.find(path.join(__dirname, '..', 'sandbox', '**', '*.*'))
|
||||
.filter((filepath) => path.extname(filepath) === '.example');
|
||||
|
||||
const changes = files.map(function(file) {
|
||||
const p = path.parse(file.path);
|
||||
const changes = files.map(function(filepath) {
|
||||
const p = path.parse(filepath);
|
||||
const nonExample = path.join(p.dir, p.name);
|
||||
|
||||
return {
|
||||
file: file.path,
|
||||
file: filepath,
|
||||
copy: nonExample
|
||||
};
|
||||
}).filter(function(change) {
|
||||
|
559
package-lock.json
generated
559
package-lock.json
generated
@ -1485,6 +1485,12 @@
|
||||
"lodash": "^4.17.14"
|
||||
}
|
||||
},
|
||||
"async-array-reduce": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/async-array-reduce/-/async-array-reduce-0.2.1.tgz",
|
||||
"integrity": "sha1-yL4BCitc0A3qlsgRFgNGk9/dgtE=",
|
||||
"dev": true
|
||||
},
|
||||
"async-each": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
|
||||
@ -1546,98 +1552,6 @@
|
||||
"is-buffer": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"babel-code-frame": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
|
||||
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^1.1.3",
|
||||
"esutils": "^2.0.2",
|
||||
"js-tokens": "^3.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
||||
"dev": true
|
||||
},
|
||||
"chalk": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^2.2.1",
|
||||
"escape-string-regexp": "^1.0.2",
|
||||
"has-ansi": "^2.0.0",
|
||||
"strip-ansi": "^3.0.0",
|
||||
"supports-color": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
|
||||
"dev": true
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel-generator": {
|
||||
"version": "6.26.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
|
||||
"integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-messages": "^6.23.0",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"babel-types": "^6.26.0",
|
||||
"detect-indent": "^4.0.0",
|
||||
"jsesc": "^1.3.0",
|
||||
"lodash": "^4.17.4",
|
||||
"source-map": "^0.5.7",
|
||||
"trim-right": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsesc": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
|
||||
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel-messages": {
|
||||
"version": "6.23.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
|
||||
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-runtime": "^6.22.0"
|
||||
}
|
||||
},
|
||||
"babel-plugin-dynamic-import-node": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz",
|
||||
@ -1647,109 +1561,6 @@
|
||||
"object.assign": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"babel-runtime": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
|
||||
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"core-js": "^2.4.0",
|
||||
"regenerator-runtime": "^0.11.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"regenerator-runtime": {
|
||||
"version": "0.11.1",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
|
||||
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel-template": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
|
||||
"integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-runtime": "^6.26.0",
|
||||
"babel-traverse": "^6.26.0",
|
||||
"babel-types": "^6.26.0",
|
||||
"babylon": "^6.18.0",
|
||||
"lodash": "^4.17.4"
|
||||
}
|
||||
},
|
||||
"babel-traverse": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
|
||||
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-code-frame": "^6.26.0",
|
||||
"babel-messages": "^6.23.0",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"babel-types": "^6.26.0",
|
||||
"babylon": "^6.18.0",
|
||||
"debug": "^2.6.8",
|
||||
"globals": "^9.18.0",
|
||||
"invariant": "^2.2.2",
|
||||
"lodash": "^4.17.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"globals": {
|
||||
"version": "9.18.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
|
||||
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
|
||||
"dev": true
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel-types": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
|
||||
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-runtime": "^6.26.0",
|
||||
"esutils": "^2.0.2",
|
||||
"lodash": "^4.17.4",
|
||||
"to-fast-properties": "^1.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"to-fast-properties": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
|
||||
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"babelify": {
|
||||
"version": "10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/babelify/-/babelify-10.0.0.tgz",
|
||||
"integrity": "sha512-X40FaxyH7t3X+JFAKvb1H9wooWKLRCi8pg3m8poqtdZaIng+bjzp9RvKQCvRjF9isHiPkXspbbXT/zwXLtwgwg==",
|
||||
"dev": true
|
||||
},
|
||||
"babylon": {
|
||||
"version": "6.18.0",
|
||||
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
|
||||
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
|
||||
"dev": true
|
||||
},
|
||||
"backo2": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
|
||||
@ -2223,18 +2034,6 @@
|
||||
"safe-buffer": "^5.1.2"
|
||||
}
|
||||
},
|
||||
"browserify-istanbul": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/browserify-istanbul/-/browserify-istanbul-3.0.1.tgz",
|
||||
"integrity": "sha1-Gi3WPAyBoSORqApGb775F+sS3gc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"istanbul-lib-instrument": "^1.8.0",
|
||||
"minimatch": "^3.0.4",
|
||||
"object-assign": "^4.1.1",
|
||||
"through": "^2.3.8"
|
||||
}
|
||||
},
|
||||
"browserify-rsa": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
|
||||
@ -3289,9 +3088,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"core-js": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz",
|
||||
"integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==",
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz",
|
||||
"integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==",
|
||||
"dev": true
|
||||
},
|
||||
"core-js-compat": {
|
||||
@ -3748,15 +3547,6 @@
|
||||
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=",
|
||||
"dev": true
|
||||
},
|
||||
"detect-indent": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
|
||||
"integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"repeating": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"detective": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz",
|
||||
@ -4655,6 +4445,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"expand-tilde": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
|
||||
"integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"homedir-polyfill": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"extend": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
||||
@ -4873,16 +4672,6 @@
|
||||
"integrity": "sha512-iSWteWtfNcrWQTkQw8ble2bnonSl7YJImsn9OZKpE2E4IHhXI78eASpDYUljXZZdYj36QsEKjOs/CsiDqmKMJw==",
|
||||
"dev": true
|
||||
},
|
||||
"fill-keys": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz",
|
||||
"integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-object": "~1.0.1",
|
||||
"merge-descriptors": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
|
||||
@ -6290,6 +6079,30 @@
|
||||
"ini": "^1.3.4"
|
||||
}
|
||||
},
|
||||
"global-modules": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
|
||||
"integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"global-prefix": "^1.0.1",
|
||||
"is-windows": "^1.0.1",
|
||||
"resolve-dir": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"global-prefix": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
|
||||
"integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"expand-tilde": "^2.0.2",
|
||||
"homedir-polyfill": "^1.0.1",
|
||||
"ini": "^1.3.4",
|
||||
"is-windows": "^1.0.1",
|
||||
"which": "^1.2.14"
|
||||
}
|
||||
},
|
||||
"globals": {
|
||||
"version": "11.12.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
|
||||
@ -6447,13 +6260,24 @@
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||
"dev": true
|
||||
},
|
||||
"has-require": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/has-require/-/has-require-1.2.2.tgz",
|
||||
"integrity": "sha1-khZ1qxMNvZdo/I2o8ajiQt+kF3Q=",
|
||||
"has-glob": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-glob/-/has-glob-1.0.0.tgz",
|
||||
"integrity": "sha1-mqqe7b/7G6OZCnsAEPtnjuAIEgc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"escape-string-regexp": "^1.0.3"
|
||||
"is-glob": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-glob": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
|
||||
"integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-extglob": "^2.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"has-symbols": {
|
||||
@ -6535,12 +6359,6 @@
|
||||
"pinkie-promise": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"hat": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/hat/-/hat-0.0.3.tgz",
|
||||
"integrity": "sha1-uwFKnmSzeIrtgAWRdBPU/z1QLYo=",
|
||||
"dev": true
|
||||
},
|
||||
"hmac-drbg": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
||||
@ -6552,6 +6370,15 @@
|
||||
"minimalistic-crypto-utils": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"homedir-polyfill": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
|
||||
"integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"parse-passwd": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"hosted-git-info": {
|
||||
"version": "2.8.4",
|
||||
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.4.tgz",
|
||||
@ -7457,6 +7284,12 @@
|
||||
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
|
||||
"dev": true
|
||||
},
|
||||
"is-valid-glob": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz",
|
||||
"integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=",
|
||||
"dev": true
|
||||
},
|
||||
"is-whitespace-character": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.3.tgz",
|
||||
@ -7613,27 +7446,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"istanbul-lib-coverage": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz",
|
||||
"integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==",
|
||||
"dev": true
|
||||
},
|
||||
"istanbul-lib-instrument": {
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz",
|
||||
"integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-generator": "^6.18.0",
|
||||
"babel-template": "^6.16.0",
|
||||
"babel-traverse": "^6.18.0",
|
||||
"babel-types": "^6.18.0",
|
||||
"babylon": "^6.18.0",
|
||||
"istanbul-lib-coverage": "^1.2.1",
|
||||
"semver": "^5.3.0"
|
||||
}
|
||||
},
|
||||
"js-levenshtein": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz",
|
||||
@ -7646,12 +7458,6 @@
|
||||
"integrity": "sha1-+IxgjjJKM3OpW8xFrTBeXJecRZs=",
|
||||
"dev": true
|
||||
},
|
||||
"js-string-escape": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz",
|
||||
"integrity": "sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=",
|
||||
"dev": true
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
@ -7961,12 +7767,6 @@
|
||||
"integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==",
|
||||
"dev": true
|
||||
},
|
||||
"core-js": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz",
|
||||
"integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==",
|
||||
"dev": true
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
@ -8045,20 +7845,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"karma-browserify": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/karma-browserify/-/karma-browserify-5.3.0.tgz",
|
||||
"integrity": "sha512-EMaUd1RNyQVGTETI80dtX/fEtYs57/A5sl3rClvzJFImPW1s3EtsbESfqNtk7/OkzfYuAHLh4RSZSSbVgvhNdQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"convert-source-map": "^1.1.3",
|
||||
"hat": "^0.0.3",
|
||||
"js-string-escape": "^1.0.0",
|
||||
"lodash": "^4.17.10",
|
||||
"minimatch": "^3.0.0",
|
||||
"os-shim": "^0.1.3"
|
||||
}
|
||||
},
|
||||
"karma-browserstack-launcher": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/karma-browserstack-launcher/-/karma-browserstack-launcher-1.4.0.tgz",
|
||||
@ -9044,6 +8830,20 @@
|
||||
"integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==",
|
||||
"dev": true
|
||||
},
|
||||
"matched": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/matched/-/matched-1.0.2.tgz",
|
||||
"integrity": "sha512-7ivM1jFZVTOOS77QsR+TtYHH0ecdLclMkqbf5qiJdX2RorqfhsL65QHySPZgDE0ZjHoh+mQUNHTanNXIlzXd0Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arr-union": "^3.1.0",
|
||||
"async-array-reduce": "^0.2.1",
|
||||
"glob": "^7.1.2",
|
||||
"has-glob": "^1.0.0",
|
||||
"is-valid-glob": "^1.0.0",
|
||||
"resolve-dir": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"matcher": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.1.tgz",
|
||||
@ -9248,12 +9048,6 @@
|
||||
"trim-newlines": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"merge-descriptors": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=",
|
||||
"dev": true
|
||||
},
|
||||
"merge2": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.4.tgz",
|
||||
@ -9430,12 +9224,6 @@
|
||||
"xtend": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"module-not-found-error": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz",
|
||||
"integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=",
|
||||
"dev": true
|
||||
},
|
||||
"mpd-parser": {
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.8.1.tgz",
|
||||
@ -10487,27 +10275,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"os-shim": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz",
|
||||
"integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=",
|
||||
"dev": true
|
||||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
||||
"dev": true
|
||||
},
|
||||
"outpipe": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz",
|
||||
"integrity": "sha1-UM+GFjZeh+Ax4ppeyTOaPaRyX6I=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"shell-quote": "^1.4.2"
|
||||
}
|
||||
},
|
||||
"p-defer": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
|
||||
@ -10682,6 +10455,12 @@
|
||||
"json-parse-better-errors": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"parse-passwd": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
|
||||
"integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
|
||||
"dev": true
|
||||
},
|
||||
"parse5": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz",
|
||||
@ -10823,12 +10602,6 @@
|
||||
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
|
||||
"dev": true
|
||||
},
|
||||
"pff": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pff/-/pff-1.0.0.tgz",
|
||||
"integrity": "sha1-6l8J7mVxyuKSp4/CgJBaOGVmjng=",
|
||||
"dev": true
|
||||
},
|
||||
"phantomjs-prebuilt": {
|
||||
"version": "2.1.16",
|
||||
"resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz",
|
||||
@ -11249,53 +11022,6 @@
|
||||
"levenshtein-edit-distance": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"proxyquireify": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/proxyquireify/-/proxyquireify-3.2.1.tgz",
|
||||
"integrity": "sha1-Fb7hATYKzJHc2G7k2aRF+Klx7qA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"browser-pack": "^6.0.0",
|
||||
"detective": "~4.1.0",
|
||||
"fill-keys": "^1.0.0",
|
||||
"has-require": "^1.1.0",
|
||||
"module-not-found-error": "~1.0.1",
|
||||
"require-deps": "~1.0.1",
|
||||
"through": "~2.2.7",
|
||||
"xtend": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"acorn": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz",
|
||||
"integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=",
|
||||
"dev": true
|
||||
},
|
||||
"detective": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/detective/-/detective-4.1.1.tgz",
|
||||
"integrity": "sha1-nEusHp+4uzT38YyuCA6h0Dr/LNo=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"acorn": "^1.0.3",
|
||||
"defined": "^1.0.0",
|
||||
"escodegen": "^1.4.1"
|
||||
}
|
||||
},
|
||||
"through": {
|
||||
"version": "2.2.7",
|
||||
"resolved": "https://registry.npmjs.org/through/-/through-2.2.7.tgz",
|
||||
"integrity": "sha1-bo4hIAGR1OtqmfbwEN9Gqhxusr0=",
|
||||
"dev": true
|
||||
},
|
||||
"xtend": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz",
|
||||
"integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"prr": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
|
||||
@ -11673,9 +11399,9 @@
|
||||
}
|
||||
},
|
||||
"regexp-tree": {
|
||||
"version": "0.1.12",
|
||||
"resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.12.tgz",
|
||||
"integrity": "sha512-TsXZ8+cv2uxMEkLfgwO0E068gsNMLfuYwMMhiUxf0Kw2Vcgzq93vgl6wIlIYuPmfMqMjfQ9zAporiozqCnwLuQ==",
|
||||
"version": "0.1.13",
|
||||
"resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.13.tgz",
|
||||
"integrity": "sha512-hwdV/GQY5F8ReLZWO+W1SRoN5YfpOKY6852+tBFcma72DKBIcHjPRIlIvQN35bCOljuAfP2G2iB0FC/w236mUw==",
|
||||
"dev": true
|
||||
},
|
||||
"regexpp": {
|
||||
@ -12122,15 +11848,6 @@
|
||||
"tough-cookie": "^2.3.3"
|
||||
}
|
||||
},
|
||||
"require-deps": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/require-deps/-/require-deps-1.0.1.tgz",
|
||||
"integrity": "sha1-JBXPScNb02pdMXc5UQjT8jcgUmM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pff": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
@ -12167,6 +11884,16 @@
|
||||
"path-parse": "^1.0.6"
|
||||
}
|
||||
},
|
||||
"resolve-dir": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
|
||||
"integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"expand-tilde": "^2.0.0",
|
||||
"global-modules": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"resolve-from": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
|
||||
@ -12302,6 +12029,15 @@
|
||||
"rollup-pluginutils": "^2.3.1"
|
||||
}
|
||||
},
|
||||
"rollup-plugin-multi-entry": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-multi-entry/-/rollup-plugin-multi-entry-2.1.0.tgz",
|
||||
"integrity": "sha512-YVVsI15uvbxMKdeYS5NXQa5zbVr/DYdDBBwseC80+KAc7mqDUjM6Qe4wl+jFucVw1yvBDZFk0PPSBZqoLq8xUA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"matched": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"rollup-plugin-node-resolve": {
|
||||
"version": "4.2.4",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.2.4.tgz",
|
||||
@ -12323,6 +12059,50 @@
|
||||
"chalk": "^2.4.2"
|
||||
}
|
||||
},
|
||||
"rollup-plugin-stub": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-stub/-/rollup-plugin-stub-1.2.0.tgz",
|
||||
"integrity": "sha1-qw2iBug5rsJTe58D66iKekn4yog=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"acorn": "^4.0.3",
|
||||
"magic-string": "^0.17.0",
|
||||
"rollup-pluginutils": "^1.5.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"acorn": {
|
||||
"version": "4.0.13",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
|
||||
"integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=",
|
||||
"dev": true
|
||||
},
|
||||
"estree-walker": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.2.1.tgz",
|
||||
"integrity": "sha1-va/oCVOD2EFNXcLs9MkXO225QS4=",
|
||||
"dev": true
|
||||
},
|
||||
"magic-string": {
|
||||
"version": "0.17.0",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.17.0.tgz",
|
||||
"integrity": "sha1-wcLC8+MNKlaPBVqW6hHOA2ZPt3I=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"vlq": "^0.2.1"
|
||||
}
|
||||
},
|
||||
"rollup-pluginutils": {
|
||||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz",
|
||||
"integrity": "sha1-HhVud4+UtyVb+hs9AXi+j1xVJAg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"estree-walker": "^0.2.1",
|
||||
"minimatch": "^3.0.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"rollup-pluginutils": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz",
|
||||
@ -14475,6 +14255,12 @@
|
||||
"global": "^4.3.1"
|
||||
}
|
||||
},
|
||||
"vlq": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz",
|
||||
"integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==",
|
||||
"dev": true
|
||||
},
|
||||
"vm-browserify": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz",
|
||||
@ -14496,21 +14282,6 @@
|
||||
"browser-process-hrtime": "^0.1.2"
|
||||
}
|
||||
},
|
||||
"watchify": {
|
||||
"version": "3.11.1",
|
||||
"resolved": "https://registry.npmjs.org/watchify/-/watchify-3.11.1.tgz",
|
||||
"integrity": "sha512-WwnUClyFNRMB2NIiHgJU9RQPQNqVeFk7OmZaWf5dC5EnNa0Mgr7imBydbaJ7tGTuPM2hz1Cb4uiBvK9NVxMfog==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"anymatch": "^2.0.0",
|
||||
"browserify": "^16.1.0",
|
||||
"chokidar": "^2.1.1",
|
||||
"defined": "^1.0.0",
|
||||
"outpipe": "^1.1.0",
|
||||
"through2": "^2.0.0",
|
||||
"xtend": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"watchpack": {
|
||||
"version": "0.2.9",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-0.2.9.tgz",
|
||||
|
@ -96,10 +96,8 @@
|
||||
"@babel/preset-env": "^7.4.5",
|
||||
"access-sniff": "^3.2.0",
|
||||
"autoprefixer": "^9.6.0",
|
||||
"babelify": "^10.0.0",
|
||||
"bestzip": "^2.1.4",
|
||||
"browserify": "^16.2.3",
|
||||
"browserify-istanbul": "^3.0.1",
|
||||
"chokidar-cli": "^1.2.2",
|
||||
"clean-css-cli": "^4.3.0",
|
||||
"cli-table": "^0.3.1",
|
||||
@ -114,7 +112,6 @@
|
||||
"husky": "^1.2.0",
|
||||
"jsdoc": "^3.6.2",
|
||||
"karma": "^4.1.0",
|
||||
"karma-browserify": "^5.3.0",
|
||||
"lint-staged": "^8.2.0",
|
||||
"markdown-table": "^1.1.3",
|
||||
"maxmin": "^2.1.0",
|
||||
@ -122,7 +119,6 @@
|
||||
"npm-merge-driver-install": "^1.1.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"postcss-cli": "^6.1.2",
|
||||
"proxyquireify": "^3.2.1",
|
||||
"qunit": "^2.9.2",
|
||||
"remark-cli": "^6.0.1",
|
||||
"remark-lint": "^6.0.4",
|
||||
@ -138,7 +134,9 @@
|
||||
"rollup-plugin-ignore": "^1.0.5",
|
||||
"rollup-plugin-json": "^3.1.0",
|
||||
"rollup-plugin-node-resolve": "^4.2.4",
|
||||
"rollup-plugin-multi-entry": "^2.0.2",
|
||||
"rollup-plugin-progress": "^1.1.1",
|
||||
"rollup-plugin-stub": "^1.2.0",
|
||||
"sass": "^1.21.0",
|
||||
"semver": "^5.7.0",
|
||||
"shelljs": "^0.8.3",
|
||||
@ -151,7 +149,6 @@
|
||||
"videojs-generate-karma-config": "~5.2.1",
|
||||
"videojs-languages": "^2.0.0",
|
||||
"videojs-standard": "^8.0.3",
|
||||
"watchify": "^3.11.0",
|
||||
"webpack": "^1.15.0"
|
||||
},
|
||||
"vjsstandard": {
|
||||
|
@ -9,6 +9,8 @@ import ignore from 'rollup-plugin-ignore';
|
||||
import alias from 'rollup-plugin-alias';
|
||||
import _ from 'lodash';
|
||||
import pkg from './package.json';
|
||||
import multiEntry from 'rollup-plugin-multi-entry';
|
||||
import stub from 'rollup-plugin-stub';
|
||||
|
||||
const compiledLicense = _.template(fs.readFileSync('./build/license-header.txt', 'utf8'));
|
||||
const bannerData = _.pick(pkg, ['version', 'copyright']);
|
||||
@ -247,5 +249,30 @@ export default cliargs => [
|
||||
],
|
||||
onwarn,
|
||||
watch
|
||||
},
|
||||
{
|
||||
input: 'test/unit/**/*.test.js',
|
||||
output: {
|
||||
format: 'iife',
|
||||
name: 'videojsTests',
|
||||
file: 'test/dist/bundle.js',
|
||||
globals: globals.test
|
||||
},
|
||||
external: externals.test,
|
||||
plugins: [
|
||||
multiEntry({exports: false}),
|
||||
alias({
|
||||
'video.js': path.resolve(__dirname, './src/js/video.js')
|
||||
}),
|
||||
primedResolve,
|
||||
json(),
|
||||
stub(),
|
||||
primedCjs,
|
||||
primedBabel,
|
||||
cliargs.progress !== false ? progress() : {}
|
||||
],
|
||||
onwarn,
|
||||
watch
|
||||
}
|
||||
|
||||
];
|
||||
|
@ -150,11 +150,19 @@ export const getFileExtension = function(path) {
|
||||
* @param {string} url
|
||||
* The url to check.
|
||||
*
|
||||
* @param {Object} [winLoc]
|
||||
* the domain to check the url against, defaults to window.location
|
||||
*
|
||||
* @param {string} [winLoc.protocol]
|
||||
* The window location protocol defaults to window.location.protocol
|
||||
*
|
||||
* @param {string} [winLoc.host]
|
||||
* The window location host defaults to window.location.host
|
||||
*
|
||||
* @return {boolean}
|
||||
* Whether it is a cross domain request or not.
|
||||
*/
|
||||
export const isCrossOrigin = function(url) {
|
||||
const winLoc = window.location;
|
||||
export const isCrossOrigin = function(url, winLoc = window.location) {
|
||||
const urlInfo = parseUrl(url);
|
||||
|
||||
// IE8 protocol relative urls will return ':' for protocol
|
||||
|
@ -1,19 +0,0 @@
|
||||
/* eslint-env qunit */
|
||||
import 'es5-shim';
|
||||
import 'es6-shim';
|
||||
import document from 'global/document';
|
||||
import window from 'global/window';
|
||||
import sinon from 'sinon';
|
||||
|
||||
window.q = QUnit;
|
||||
window.sinon = sinon;
|
||||
|
||||
// There's nowhere we require completing xhr requests
|
||||
// and raynos/xhr doesn't want to make stubbing easy (Raynos/xhr#11)
|
||||
// so we need to stub XHR before the xhr module is included anywhere else.
|
||||
window.xhr = sinon.useFakeXMLHttpRequest();
|
||||
|
||||
// This may not be needed anymore, but double check before removing
|
||||
window.fixture = document.createElement('div');
|
||||
window.fixture.id = 'qunit-fixture';
|
||||
document.body.appendChild(window.fixture);
|
@ -30,34 +30,17 @@ module.exports = function(config) {
|
||||
});
|
||||
|
||||
config.files = [
|
||||
'node_modules/es5-shim/es5-shim.js',
|
||||
'node_modules/es6-shim/es6-shim.js',
|
||||
'node_modules/sinon/pkg/sinon.js',
|
||||
'dist/video-js.css',
|
||||
'test/globals-shim.js',
|
||||
'test/unit/**/*.js',
|
||||
'test/dist/bundle.js',
|
||||
'test/dist/browserify.js',
|
||||
'test/dist/webpack.js',
|
||||
{pattern: 'src/**/*.js', watched: true, included: false, served: false }
|
||||
'test/dist/webpack.js'
|
||||
];
|
||||
|
||||
config.browserStack.project = 'Video.js';
|
||||
|
||||
config.frameworks.push('browserify');
|
||||
config.browserify = {
|
||||
debug: true,
|
||||
plugin: ['proxyquireify/plugin'],
|
||||
transform: [
|
||||
['babelify', {presets: [['@babel/preset-env', {loose: true}]]}]
|
||||
]
|
||||
};
|
||||
|
||||
if (reportCoverage) {
|
||||
config.browserify.transform.push('browserify-istanbul');
|
||||
}
|
||||
|
||||
config.preprocessors = {
|
||||
'test/globals-shim.js': ['browserify'],
|
||||
'test/unit/**/*.js': ['browserify']
|
||||
};
|
||||
|
||||
// pin Browserstack Firefox version to 64
|
||||
/* eslint-disable camelcase */
|
||||
config.customLaunchers.bsFirefox.browser_version = '64.0';
|
||||
|
@ -791,7 +791,7 @@ QUnit.test('should emit a tap event', function(assert) {
|
||||
|
||||
assert.expect(3);
|
||||
// Fake touch support. Real touch support isn't needed for this test.
|
||||
browser.TOUCH_ENABLED = true;
|
||||
browser.stub_TOUCH_ENABLED(true);
|
||||
|
||||
comp.emitTapEvents();
|
||||
comp.on('tap', function() {
|
||||
@ -839,7 +839,7 @@ QUnit.test('should emit a tap event', function(assert) {
|
||||
comp.trigger('touchend');
|
||||
|
||||
// Reset to orignial value
|
||||
browser.TOUCH_ENABLED = origTouch;
|
||||
browser.stub_TOUCH_ENABLED(origTouch);
|
||||
comp.dispose();
|
||||
});
|
||||
|
||||
|
@ -14,6 +14,7 @@ import sinon from 'sinon';
|
||||
import window from 'global/window';
|
||||
import * as middleware from '../../src/js/tech/middleware.js';
|
||||
import * as Events from '../../src/js/utils/events.js';
|
||||
import pkg from '../../package.json';
|
||||
|
||||
QUnit.module('Player', {
|
||||
beforeEach() {
|
||||
@ -703,13 +704,13 @@ QUnit.test('should add a touch-enabled classname when touch is supported', funct
|
||||
// Fake touch support. Real touch support isn't needed for this test.
|
||||
const origTouch = browser.TOUCH_ENABLED;
|
||||
|
||||
browser.TOUCH_ENABLED = true;
|
||||
browser.stub_TOUCH_ENABLED(true);
|
||||
|
||||
const player = TestHelpers.makePlayer({});
|
||||
|
||||
assert.notEqual(player.el().className.indexOf('vjs-touch-enabled'), -1, 'touch-enabled classname added');
|
||||
|
||||
browser.TOUCH_ENABLED = origTouch;
|
||||
browser.stub_TOUCH_ENABLED(origTouch);
|
||||
player.dispose();
|
||||
});
|
||||
|
||||
@ -719,13 +720,13 @@ QUnit.test('should not add a touch-enabled classname when touch is not supported
|
||||
// Fake not having touch support in case that the browser running the test supports it
|
||||
const origTouch = browser.TOUCH_ENABLED;
|
||||
|
||||
browser.TOUCH_ENABLED = false;
|
||||
browser.stub_TOUCH_ENABLED(false);
|
||||
|
||||
const player = TestHelpers.makePlayer({});
|
||||
|
||||
assert.equal(player.el().className.indexOf('vjs-touch-enabled'), -1, 'touch-enabled classname not added');
|
||||
|
||||
browser.TOUCH_ENABLED = origTouch;
|
||||
browser.stub_TOUCH_ENABLED(origTouch);
|
||||
player.dispose();
|
||||
});
|
||||
|
||||
@ -1997,7 +1998,7 @@ QUnit.test('options: plugins', function(assert) {
|
||||
});
|
||||
|
||||
QUnit.test('should add a class with major version', function(assert) {
|
||||
const majorVersion = require('../../package.json').version.split('.')[0];
|
||||
const majorVersion = pkg.version.split('.')[0];
|
||||
const player = TestHelpers.makePlayer();
|
||||
|
||||
assert.ok(player.hasClass('vjs-v' + majorVersion), 'the version class should be added to the player');
|
||||
|
@ -1,13 +1,11 @@
|
||||
/* eslint-env qunit */
|
||||
import PosterImage from '../../src/js/poster-image.js';
|
||||
import * as browser from '../../src/js/utils/browser.js';
|
||||
import TestHelpers from './test-helpers.js';
|
||||
import document from 'global/document';
|
||||
|
||||
QUnit.module('PosterImage', {
|
||||
beforeEach() {
|
||||
// Store the original background support so we can test different vals
|
||||
this.origVal = browser.BACKGROUND_SIZE_SUPPORTED;
|
||||
this.poster1 = '#poster1';
|
||||
this.poster2 = '#poster2';
|
||||
|
||||
@ -27,14 +25,10 @@ QUnit.module('PosterImage', {
|
||||
}
|
||||
};
|
||||
},
|
||||
afterEach() {
|
||||
browser.BACKGROUND_SIZE_SUPPORTED = this.origVal;
|
||||
}
|
||||
afterEach() {}
|
||||
});
|
||||
|
||||
QUnit.test('should create and update a poster image', function(assert) {
|
||||
browser.BACKGROUND_SIZE_SUPPORTED = true;
|
||||
|
||||
const posterImage = new PosterImage(this.mockPlayer);
|
||||
let backgroundImage = posterImage.el().style.backgroundImage;
|
||||
|
||||
|
@ -126,17 +126,17 @@ QUnit.test('blacklist playbackRate support on older verisons of Chrome on Androi
|
||||
const oldIsChrome = browser.IS_CHROME;
|
||||
const oldChromeVersion = browser.CHROME_VERSION;
|
||||
|
||||
browser.IS_ANDROID = true;
|
||||
browser.IS_CHROME = true;
|
||||
browser.CHROME_VERSION = 50;
|
||||
browser.stub_IS_ANDROID(true);
|
||||
browser.stub_IS_CHROME(true);
|
||||
browser.stub_CHROME_VERSION(50);
|
||||
assert.strictEqual(Html5.canControlPlaybackRate(), false, 'canControlPlaybackRate should return false on older Chrome');
|
||||
|
||||
browser.CHROME_VERSION = 58;
|
||||
browser.stub_CHROME_VERSION(58);
|
||||
assert.strictEqual(Html5.canControlPlaybackRate(), true, 'canControlPlaybackRate should return true on newer Chrome');
|
||||
|
||||
browser.IS_ANDROID = oldIsAndroid;
|
||||
browser.IS_CHROME = oldIsChrome;
|
||||
browser.CHROME_VERSION = oldChromeVersion;
|
||||
browser.stub_IS_ANDROID(oldIsAndroid);
|
||||
browser.stub_IS_CHROME(oldIsChrome);
|
||||
browser.stub_CHROME_VERSION(oldChromeVersion);
|
||||
});
|
||||
|
||||
QUnit.test('test volume', function(assert) {
|
||||
@ -195,9 +195,9 @@ QUnit.test('patchCanPlayType patches canplaytype with our function, conditionall
|
||||
const video = document.createElement('video');
|
||||
const canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;
|
||||
|
||||
browser.ANDROID_VERSION = 4.0;
|
||||
browser.IS_FIREFOX = false;
|
||||
browser.IS_CHROME = false;
|
||||
browser.stub_ANDROID_VERSION(4.0);
|
||||
browser.stub_IS_FIREFOX(false);
|
||||
browser.stub_IS_CHROME(false);
|
||||
Html5.patchCanPlayType();
|
||||
|
||||
assert.notStrictEqual(
|
||||
@ -220,9 +220,9 @@ QUnit.test('patchCanPlayType patches canplaytype with our function, conditionall
|
||||
'patched canPlayType and function returned from unpatch are equal'
|
||||
);
|
||||
|
||||
browser.ANDROID_VERSION = oldAV;
|
||||
browser.IS_FIREFOX = oldIsFirefox;
|
||||
browser.IS_CHROME = oldIsChrome;
|
||||
browser.stub_ANDROID_VERSION(oldAV);
|
||||
browser.stub_IS_FIREFOX(oldIsFirefox);
|
||||
browser.stub_IS_CHROME(oldIsChrome);
|
||||
Html5.unpatchCanPlayType();
|
||||
});
|
||||
|
||||
@ -236,9 +236,9 @@ QUnit.test('patchCanPlayType doesn\'t patch canplaytype with our function in Chr
|
||||
const video = document.createElement('video');
|
||||
const canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;
|
||||
|
||||
browser.ANDROID_VERSION = 4.0;
|
||||
browser.IS_CHROME = true;
|
||||
browser.IS_FIREFOX = false;
|
||||
browser.stub_ANDROID_VERSION(4.0);
|
||||
browser.stub_IS_CHROME(true);
|
||||
browser.stub_IS_FIREFOX(false);
|
||||
Html5.patchCanPlayType();
|
||||
|
||||
assert.strictEqual(
|
||||
@ -247,9 +247,9 @@ QUnit.test('patchCanPlayType doesn\'t patch canplaytype with our function in Chr
|
||||
'original canPlayType and patched canPlayType should be equal'
|
||||
);
|
||||
|
||||
browser.ANDROID_VERSION = oldAV;
|
||||
browser.IS_CHROME = oldIsChrome;
|
||||
browser.IS_FIREFOX = oldIsFirefox;
|
||||
browser.stub_ANDROID_VERSION(oldAV);
|
||||
browser.stub_IS_CHROME(oldIsChrome);
|
||||
browser.stub_IS_FIREFOX(oldIsFirefox);
|
||||
Html5.unpatchCanPlayType();
|
||||
});
|
||||
|
||||
@ -263,9 +263,9 @@ QUnit.test('patchCanPlayType doesn\'t patch canplaytype with our function in Fir
|
||||
const video = document.createElement('video');
|
||||
const canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;
|
||||
|
||||
browser.ANDROID_VERSION = 4.0;
|
||||
browser.IS_FIREFOX = true;
|
||||
browser.IS_CHROME = false;
|
||||
browser.stub_ANDROID_VERSION(4.0);
|
||||
browser.stub_IS_FIREFOX(true);
|
||||
browser.stub_IS_CHROME(false);
|
||||
Html5.patchCanPlayType();
|
||||
|
||||
assert.strictEqual(
|
||||
@ -274,9 +274,9 @@ QUnit.test('patchCanPlayType doesn\'t patch canplaytype with our function in Fir
|
||||
'original canPlayType and patched canPlayType should be equal'
|
||||
);
|
||||
|
||||
browser.ANDROID_VERSION = oldAV;
|
||||
browser.IS_FIREFOX = oldIsFirefox;
|
||||
browser.IS_CHROME = oldIsChrome;
|
||||
browser.stub_ANDROID_VERSION(oldAV);
|
||||
browser.stub_IS_FIREFOX(oldIsFirefox);
|
||||
browser.stub_IS_CHROME(oldIsChrome);
|
||||
Html5.unpatchCanPlayType();
|
||||
});
|
||||
|
||||
@ -286,9 +286,9 @@ QUnit.test('should return maybe for HLS urls on Android 4.0 or above when not Ch
|
||||
const oldIsChrome = browser.IS_CHROME;
|
||||
const video = document.createElement('video');
|
||||
|
||||
browser.ANDROID_VERSION = 4.0;
|
||||
browser.IS_FIREFOX = false;
|
||||
browser.IS_CHROME = false;
|
||||
browser.stub_ANDROID_VERSION(4.0);
|
||||
browser.stub_IS_FIREFOX(false);
|
||||
browser.stub_IS_CHROME(false);
|
||||
Html5.patchCanPlayType();
|
||||
|
||||
assert.strictEqual(
|
||||
@ -314,26 +314,9 @@ QUnit.test('should return maybe for HLS urls on Android 4.0 or above when not Ch
|
||||
'maybe for vnd.apple.mpegurl'
|
||||
);
|
||||
|
||||
browser.ANDROID_VERSION = oldAV;
|
||||
browser.IS_FIREFOX = oldIsFirefox;
|
||||
browser.IS_CHROME = oldIsChrome;
|
||||
Html5.unpatchCanPlayType();
|
||||
});
|
||||
|
||||
QUnit.test('should return a maybe for mp4 on OLD ANDROID', function(assert) {
|
||||
const isOldAndroid = browser.IS_OLD_ANDROID;
|
||||
const video = document.createElement('video');
|
||||
|
||||
browser.IS_OLD_ANDROID = true;
|
||||
Html5.patchCanPlayType();
|
||||
|
||||
assert.strictEqual(
|
||||
video.canPlayType('video/mp4'),
|
||||
'maybe',
|
||||
'old android should return a maybe for video/mp4'
|
||||
);
|
||||
|
||||
browser.IS_OLD_ANDROID = isOldAndroid;
|
||||
browser.stub_ANDROID_VERSION(oldAV);
|
||||
browser.stub_IS_FIREFOX(oldIsFirefox);
|
||||
browser.stub_IS_CHROME(oldIsChrome);
|
||||
Html5.unpatchCanPlayType();
|
||||
});
|
||||
|
||||
@ -911,8 +894,8 @@ QUnit.test('When Android Chrome reports Infinity duration with currentTime 0, re
|
||||
const oldIsChrome = browser.IS_CHROME;
|
||||
const oldEl = tech.el_;
|
||||
|
||||
browser.IS_ANDROID = true;
|
||||
browser.IS_CHROME = true;
|
||||
browser.stub_IS_ANDROID(true);
|
||||
browser.stub_IS_CHROME(true);
|
||||
|
||||
tech.el_ = {
|
||||
duration: Infinity,
|
||||
@ -920,8 +903,8 @@ QUnit.test('When Android Chrome reports Infinity duration with currentTime 0, re
|
||||
};
|
||||
assert.ok(Number.isNaN(tech.duration()), 'returned NaN with currentTime 0');
|
||||
|
||||
browser.IS_ANDROID = oldIsAndroid;
|
||||
browser.IS_CHROME = oldIsChrome;
|
||||
browser.stub_IS_ANDROID(oldIsAndroid);
|
||||
browser.stub_IS_CHROME(oldIsChrome);
|
||||
tech.el_ = oldEl;
|
||||
});
|
||||
|
||||
|
@ -52,7 +52,7 @@ QUnit.test('if native text tracks are not supported, create a texttrackdisplay',
|
||||
textTracks: []
|
||||
};
|
||||
|
||||
browser.IS_FIREFOX = true;
|
||||
browser.stub_IS_FIREFOX(true);
|
||||
|
||||
const fakeTTDSpy = sinon.spy();
|
||||
|
||||
@ -70,7 +70,7 @@ QUnit.test('if native text tracks are not supported, create a texttrackdisplay',
|
||||
assert.strictEqual(fakeTTDSpy.callCount, 1, 'text track display was created');
|
||||
|
||||
Html5.TEST_VID = oldTestVid;
|
||||
browser.IS_FIREFOX = oldIsFirefox;
|
||||
browser.stub_IS_FIREFOX(oldIsFirefox);
|
||||
Component.registerComponent('TextTrackDisplay', oldTextTrackDisplay);
|
||||
|
||||
player.dispose();
|
||||
|
@ -7,14 +7,23 @@ import TextTrack from '../../../src/js/tracks/text-track.js';
|
||||
import TestHelpers from '../test-helpers.js';
|
||||
import sinon from 'sinon';
|
||||
import log from '../../../src/js/utils/log.js';
|
||||
import XHR from '@videojs/xhr';
|
||||
|
||||
QUnit.module('Text Track', {
|
||||
beforeEach() {
|
||||
this.tech = new TechFaker();
|
||||
this.oldXMLHttpRequest = XHR.XMLHttpRequest;
|
||||
this.oldXDomainRequest = XHR.XDomainRequest;
|
||||
this.xhr = sinon.useFakeXMLHttpRequest();
|
||||
XHR.XMLHttpRequest = this.xhr;
|
||||
XHR.XDomainRequest = this.xhr;
|
||||
},
|
||||
afterEach() {
|
||||
this.tech.dispose();
|
||||
this.tech = null;
|
||||
XHR.XMLHttpRequest = this.oldXMLHttpRequest;
|
||||
XHR.XDomainRequest = this.oldXDomainRequest;
|
||||
this.xhr.restore();
|
||||
}
|
||||
});
|
||||
|
||||
@ -416,7 +425,7 @@ QUnit.test('tracks are parsed if vttjs is loaded', function(assert) {
|
||||
let parserCreated = false;
|
||||
const reqs = [];
|
||||
|
||||
window.xhr.onCreate = function(req) {
|
||||
this.xhr.onCreate = function(req) {
|
||||
reqs.push(req);
|
||||
};
|
||||
|
||||
@ -453,7 +462,7 @@ QUnit.test('tracks are parsed once vttjs is loaded', function(assert) {
|
||||
let parserCreated = false;
|
||||
const reqs = [];
|
||||
|
||||
window.xhr.onCreate = function(req) {
|
||||
this.xhr.onCreate = function(req) {
|
||||
reqs.push(req);
|
||||
};
|
||||
|
||||
@ -505,7 +514,7 @@ QUnit.test('stops processing if vttjs loading errored out', function(assert) {
|
||||
const oldLogError = log.error;
|
||||
const reqs = [];
|
||||
|
||||
window.xhr.onCreate = function(req) {
|
||||
this.xhr.onCreate = function(req) {
|
||||
reqs.push(req);
|
||||
};
|
||||
|
||||
|
@ -231,16 +231,16 @@ QUnit.test('emulated tracks are always used, except in safari', function(assert)
|
||||
textTracks: []
|
||||
};
|
||||
|
||||
browser.IS_ANY_SAFARI = false;
|
||||
browser.stub_IS_ANY_SAFARI(false);
|
||||
|
||||
assert.ok(!Html5.supportsNativeTextTracks(), 'Html5 does not support native text tracks, in non-safari');
|
||||
|
||||
browser.IS_ANY_SAFARI = true;
|
||||
browser.stub_IS_ANY_SAFARI(true);
|
||||
|
||||
assert.ok(Html5.supportsNativeTextTracks(), 'Html5 does support native text tracks in safari');
|
||||
|
||||
Html5.TEST_VID = oldTestVid;
|
||||
browser.IS_ANY_SAFARI = oldIsAnySafari;
|
||||
browser.stub_IS_ANY_SAFARI(oldIsAnySafari);
|
||||
});
|
||||
|
||||
QUnit.test('when switching techs, we should not get a new text track', function(assert) {
|
||||
|
@ -2,8 +2,6 @@
|
||||
import document from 'global/document';
|
||||
import window from 'global/window';
|
||||
import * as Url from '../../../src/js/utils/url.js';
|
||||
import proxyquireify from 'proxyquireify';
|
||||
const proxyquire = proxyquireify(require);
|
||||
|
||||
QUnit.module('url');
|
||||
QUnit.test('should parse the details of a url correctly', function(assert) {
|
||||
@ -75,28 +73,24 @@ QUnit.test('should get the file extension of the passed path', function(assert)
|
||||
|
||||
// isCrossOrigin tests
|
||||
QUnit.test('isCrossOrigin can identify cross origin urls', function(assert) {
|
||||
const win = {
|
||||
location: {}
|
||||
};
|
||||
const Url_ = proxyquire('../../../src/js/utils/url.js', {
|
||||
'global/window': win
|
||||
});
|
||||
|
||||
win.location.protocol = window.location.protocol;
|
||||
win.location.host = window.location.host;
|
||||
assert.ok(!Url_.isCrossOrigin(`http://${win.location.host}/example.vtt`), 'http://google.com from http://google.com is not cross origin');
|
||||
assert.ok(Url_.isCrossOrigin(`https://${win.location.host}/example.vtt`), 'https://google.com from http://google.com is cross origin');
|
||||
assert.ok(!Url_.isCrossOrigin(`//${win.location.host}/example.vtt`), '//google.com from http://google.com is not cross origin');
|
||||
assert.ok(Url_.isCrossOrigin('http://example.com/example.vtt'), 'http://example.com from http://google.com is cross origin');
|
||||
assert.ok(Url_.isCrossOrigin('https://example.com/example.vtt'), 'https://example.com from http://google.com is cross origin');
|
||||
assert.ok(Url_.isCrossOrigin('//example.com/example.vtt'), '//example.com from http://google.com is cross origin');
|
||||
assert.ok(!Url.isCrossOrigin(`http://${window.location.host}/example.vtt`), 'http://google.com from http://google.com is not cross origin');
|
||||
assert.ok(Url.isCrossOrigin(`https://${window.location.host}/example.vtt`), 'https://google.com from http://google.com is cross origin');
|
||||
assert.ok(!Url.isCrossOrigin(`//${window.location.host}/example.vtt`), '//google.com from http://google.com is not cross origin');
|
||||
assert.ok(Url.isCrossOrigin('http://example.com/example.vtt'), 'http://example.com from http://google.com is cross origin');
|
||||
assert.ok(Url.isCrossOrigin('https://example.com/example.vtt'), 'https://example.com from http://google.com is cross origin');
|
||||
assert.ok(Url.isCrossOrigin('//example.com/example.vtt'), '//example.com from http://google.com is cross origin');
|
||||
// we cannot test that relative urls work on https, though
|
||||
assert.ok(!Url_.isCrossOrigin('example.vtt'), 'relative url is not cross origin');
|
||||
assert.ok(!Url.isCrossOrigin('example.vtt'), 'relative url is not cross origin');
|
||||
|
||||
win.location.protocol = 'https:';
|
||||
win.location.host = 'google.com';
|
||||
assert.ok(Url_.isCrossOrigin('http://google.com/example.vtt'), 'http://google.com from https://google.com is cross origin');
|
||||
assert.ok(Url_.isCrossOrigin('http://example.com/example.vtt'), 'http://example.com from https://google.com is cross origin');
|
||||
assert.ok(Url_.isCrossOrigin('https://example.com/example.vtt'), 'https://example.com from https://google.com is cross origin');
|
||||
assert.ok(Url_.isCrossOrigin('//example.com/example.vtt'), '//example.com from https://google.com is cross origin');
|
||||
const location = {
|
||||
protocol: 'https:',
|
||||
host: 'google.com'
|
||||
};
|
||||
|
||||
assert.ok(!Url.isCrossOrigin('https://google.com/example.vtt', location), 'http://google.com from https://google.com is not cross origin');
|
||||
assert.ok(Url.isCrossOrigin('http://google.com/example.vtt', location), 'http://google.com from https://google.com is cross origin');
|
||||
assert.ok(Url.isCrossOrigin('http://example.com/example.vtt', location), 'http://example.com from https://google.com is cross origin');
|
||||
assert.ok(Url.isCrossOrigin('https://example.com/example.vtt', location), 'https://example.com from https://google.com is cross origin');
|
||||
assert.ok(Url.isCrossOrigin('//example.com/example.vtt', location), '//example.com from https://google.com is cross origin');
|
||||
});
|
||||
|
@ -227,13 +227,6 @@ QUnit.test('should expose options and players properties for backward-compatibil
|
||||
});
|
||||
|
||||
QUnit.test('should expose DOM functions', function(assert) {
|
||||
const origWarnLog = log.warn;
|
||||
const warnLogs = [];
|
||||
|
||||
log.warn = (args) => {
|
||||
warnLogs.push(args);
|
||||
};
|
||||
|
||||
const methods = [
|
||||
'isEl',
|
||||
'isTextNode',
|
||||
@ -252,24 +245,7 @@ QUnit.test('should expose DOM functions', function(assert) {
|
||||
methods.forEach(name => {
|
||||
assert.strictEqual(typeof videojs[name], 'function', `function videojs.${name}`);
|
||||
assert.strictEqual(typeof Dom[name], 'function', `Dom.${name} function exists`);
|
||||
|
||||
const oldMethod = Dom[name];
|
||||
let domCalls = 0;
|
||||
|
||||
Dom[name] = () => domCalls++;
|
||||
|
||||
videojs[name]();
|
||||
|
||||
assert.equal(domCalls, 1, `Dom.${name} was called when videojs.${name} is run.`);
|
||||
assert.equal(warnLogs.length, 1, `videojs.${name} logs a deprecation warning`);
|
||||
|
||||
// reset
|
||||
warnLogs.length = 0;
|
||||
Dom[name] = oldMethod;
|
||||
});
|
||||
|
||||
// reset log
|
||||
log.warn = origWarnLog;
|
||||
});
|
||||
|
||||
QUnit.test('ingest player div if data-vjs-player attribute is present on video parentNode', function(assert) {
|
||||
|
@ -18,35 +18,35 @@ QUnit.test('create a real player and dispose', function(assert) {
|
||||
// see https://github.com/videojs/video.js/issues/5858
|
||||
old.bind = Fn.bind;
|
||||
|
||||
Fn.bind = function(context, fn, uid) {
|
||||
Fn.stub_bind(function(context, fn, uid) {
|
||||
const retval = old.bind(context, fn, uid);
|
||||
|
||||
retval.og_ = fn.og_ || fn;
|
||||
retval.cx_ = fn.cx_ || context;
|
||||
|
||||
return retval;
|
||||
};
|
||||
});
|
||||
|
||||
old.throttle = Fn.throttle;
|
||||
Fn.throttle = function(fn, wait) {
|
||||
Fn.stub_throttle(function(fn, wait) {
|
||||
const retval = old.throttle(fn, wait);
|
||||
|
||||
retval.og_ = fn.og_ || fn;
|
||||
retval.cx_ = fn.cx_;
|
||||
|
||||
return retval;
|
||||
};
|
||||
});
|
||||
|
||||
old.debounce = Fn.debounce;
|
||||
|
||||
Fn.debounce = function(func, wait, immediate, context = window) {
|
||||
Fn.stub_debounce(function(func, wait, immediate, context = window) {
|
||||
const retval = old.debounce(func, wait, immediate, context);
|
||||
|
||||
retval.og_ = func.og_ || func;
|
||||
retval.cx_ = func.cx_;
|
||||
|
||||
return retval;
|
||||
};
|
||||
});
|
||||
|
||||
// TODO: use a local source rather than a remote one
|
||||
fixture.innerHTML = `
|
||||
@ -77,7 +77,7 @@ QUnit.test('create a real player and dispose', function(assert) {
|
||||
player.dispose();
|
||||
|
||||
Object.keys(old).forEach(function(k) {
|
||||
Fn[k] = old[k];
|
||||
Fn[`stub_${k}`](old[k]);
|
||||
});
|
||||
done();
|
||||
}, true);
|
||||
|
Loading…
Reference in New Issue
Block a user