videojs-contrib-quality-levels
Advanced tools
Comparing version 2.0.6 to 2.0.7
@@ -0,1 +1,8 @@ | ||
<a name="2.0.7"></a> | ||
## [2.0.7](https://github.com/videojs/videojs-contrib-quality-levels/compare/v2.0.6...v2.0.7) (2018-08-23) | ||
### Chores | ||
* generator v7 (#50) ([7837d93](https://github.com/videojs/videojs-contrib-quality-levels/commit/7837d93)), closes [#50](https://github.com/videojs/videojs-contrib-quality-levels/issues/50) | ||
<a name="2.0.6"></a> | ||
@@ -2,0 +9,0 @@ ## [2.0.6](https://github.com/videojs/videojs-contrib-quality-levels/compare/v2.0.5...v2.0.6) (2018-08-03) |
@@ -7,3 +7,3 @@ # CONTRIBUTING | ||
Make sure you have NodeJS 0.10 or higher and npm installed. | ||
Make sure you have Node.js 4.8 or higher and npm installed. | ||
@@ -16,3 +16,3 @@ 1. Fork this repository and clone your fork | ||
Refer to the [video.js plugin standards][standards] for more detail on best practices and tooling for video.js plugin authorship. | ||
Refer to the [video.js plugin conventions][conventions] for more detail on best practices and tooling for video.js plugin authorship. | ||
@@ -32,2 +32,2 @@ When you've made your changes, push your commit(s) to your fork and issue a pull request against the original repository. | ||
[local]: http://localhost:9999/test/ | ||
[standards]: https://github.com/videojs/generator-videojs-plugin/docs/standards.md | ||
[conventions]: https://github.com/videojs/generator-videojs-plugin/blob/master/docs/conventions.md |
@@ -1,2 +0,2 @@ | ||
/*! @name videojs-contrib-quality-levels @version 2.0.6 @license Apache-2.0 */ | ||
/*! @name videojs-contrib-quality-levels @version 2.0.7 @license Apache-2.0 */ | ||
'use strict'; | ||
@@ -92,3 +92,3 @@ | ||
* | ||
* @returns {boolean} True if the QualityLevel is enabled. | ||
* @return {boolean} True if the QualityLevel is enabled. | ||
*/ | ||
@@ -268,3 +268,3 @@ get: function get$$1() { | ||
* @param {string} id The id of the QualityLevel to find. | ||
* @returns {QualityLevel|null} The QualityLevel with id, or null if not found. | ||
* @return {QualityLevel|null} The QualityLevel with id, or null if not found. | ||
* @method getQualityLevelById | ||
@@ -271,0 +271,0 @@ */ |
@@ -1,2 +0,2 @@ | ||
/*! @name videojs-contrib-quality-levels @version 2.0.6 @license Apache-2.0 */ | ||
/*! @name videojs-contrib-quality-levels @version 2.0.7 @license Apache-2.0 */ | ||
import videojs from 'video.js'; | ||
@@ -88,3 +88,3 @@ import document from 'global/document'; | ||
* | ||
* @returns {boolean} True if the QualityLevel is enabled. | ||
* @return {boolean} True if the QualityLevel is enabled. | ||
*/ | ||
@@ -264,3 +264,3 @@ get: function get$$1() { | ||
* @param {string} id The id of the QualityLevel to find. | ||
* @returns {QualityLevel|null} The QualityLevel with id, or null if not found. | ||
* @return {QualityLevel|null} The QualityLevel with id, or null if not found. | ||
* @method getQualityLevelById | ||
@@ -267,0 +267,0 @@ */ |
@@ -1,2 +0,2 @@ | ||
/*! @name videojs-contrib-quality-levels @version 2.0.6 @license Apache-2.0 */ | ||
/*! @name videojs-contrib-quality-levels @version 2.0.7 @license Apache-2.0 */ | ||
(function (global, factory) { | ||
@@ -94,3 +94,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('video.js'), require('global/document')) : | ||
* | ||
* @returns {boolean} True if the QualityLevel is enabled. | ||
* @return {boolean} True if the QualityLevel is enabled. | ||
*/ | ||
@@ -270,3 +270,3 @@ get: function get$$1() { | ||
* @param {string} id The id of the QualityLevel to find. | ||
* @returns {QualityLevel|null} The QualityLevel with id, or null if not found. | ||
* @return {QualityLevel|null} The QualityLevel with id, or null if not found. | ||
* @method getQualityLevelById | ||
@@ -273,0 +273,0 @@ */ |
@@ -1,2 +0,2 @@ | ||
/*! @name videojs-contrib-quality-levels @version 2.0.6 @license Apache-2.0 */ | ||
/*! @name videojs-contrib-quality-levels @version 2.0.7 @license Apache-2.0 */ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js"),require("global/document")):"function"==typeof define&&define.amd?define(["video.js","global/document"],t):e.videojsContribQualityLevels=t(e.videojs,e.document)}(this,function(e,t){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},i=function(i){function o(){n(this,o);var l=r(this,i.call(this)),s=l;if(e.browser.IS_IE8)for(var u in s=t.createElement("custom"),o.prototype)"constructor"!==u&&(s[u]=o.prototype[u]);return s.levels_=[],s.selectedIndex_=-1,Object.defineProperty(s,"selectedIndex",{get:function(){return s.selectedIndex_}}),Object.defineProperty(s,"length",{get:function(){return s.levels_.length}}),r(l,s)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,i),o.prototype.addQualityLevel=function(r){var i=this.getQualityLevelById(r.id);if(i)return i;var o=this.levels_.length;return i=new function r(i){n(this,r);var o=this;if(e.browser.IS_IE8)for(var l in o=t.createElement("custom"),r.prototype)"constructor"!==l&&(o[l]=r.prototype[l]);return o.id=i.id,o.label=o.id,o.width=i.width,o.height=i.height,o.bitrate=i.bandwidth,o.enabled_=i.enabled,Object.defineProperty(o,"enabled",{get:function(){return o.enabled_()},set:function(e){o.enabled_(e)}}),o}(r),""+o in this||Object.defineProperty(this,o,{get:function(){return this.levels_[o]}}),this.levels_.push(i),this.trigger({qualityLevel:i,type:"addqualitylevel"}),i},o.prototype.removeQualityLevel=function(e){for(var t=null,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},o.prototype.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var r=this[t];if(r.id===e)return r}return null},o.prototype.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},o}(e.EventTarget);for(var o in i.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},i.prototype.allowedEvents_)i.prototype["on"+o]=null;var l=function(t){return n=this,e.mergeOptions({},t),r=n.qualityLevels,o=new i,n.on("dispose",function e(){o.dispose(),n.qualityLevels=r,n.off("dispose",e)}),n.qualityLevels=function(){return o},n.qualityLevels.VERSION="__VERSION__",o;var n,r,o};return(e.registerPlugin||e.plugin)("qualityLevels",l),l.VERSION="__VERSION__",l}); |
{ | ||
"name": "videojs-contrib-quality-levels", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"description": "Exposes a list of quality levels available for the source.", | ||
@@ -8,3 +8,3 @@ "main": "dist/videojs-contrib-quality-levels.cjs.js", | ||
"generator-videojs-plugin": { | ||
"version": "6.1.4" | ||
"version": "7.0.2" | ||
}, | ||
@@ -16,6 +16,6 @@ "repository": "videojs/videojs-contrib-quality-levels", | ||
"build:js": "rollup -c scripts/rollup.config.js", | ||
"clean": "rimraf dist test/dist", | ||
"postclean": "mkdirp dist test/dist", | ||
"clean": "shx rm -rf ./dist ./test/dist", | ||
"postclean": "shx mkdir -p ./dist ./test/dist", | ||
"docs": "npm-run-all docs:*", | ||
"docs:api": "jsdoc src -r -c scripts/jsdoc.json -d docs/api", | ||
"docs:api": "jsdoc src -g plugins/markdown -r -c scripts/jsdoc.json -d docs/api", | ||
"docs:toc": "doctoc README.md", | ||
@@ -27,9 +27,9 @@ "lint": "vjsstandard", | ||
"test": "karma start scripts/karma.conf.js", | ||
"update-changelog": "conventional-changelog -p videojs -i CHANGELOG.md -s", | ||
"preversion": "npm test", | ||
"version": "node scripts/version.js", | ||
"version": "is-prerelease || npm run update-changelog && git add CHANGELOG.md", | ||
"watch": "npm-run-all -p watch:*", | ||
"watch:js": "npm run build:js -- -w", | ||
"prepublish": "not-in-install && npm run build || in-install", | ||
"prepush": "npm run lint", | ||
"precommit": "npm run docs:toc && git add README.md" | ||
"precommit": "lint-staged" | ||
}, | ||
@@ -69,7 +69,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"babel-core": "^6.26.3", | ||
"babel-plugin-external-helpers": "^6.22.0", | ||
"babel-plugin-transform-object-assign": "^6.22.0", | ||
"babel-preset-env": "^1.7.0", | ||
"conventional-changelog-cli": "^2.0.0", | ||
"conventional-changelog-cli": "^2.0.1", | ||
"conventional-changelog-videojs": "^3.0.0", | ||
@@ -79,29 +75,15 @@ "doctoc": "^1.3.1", | ||
"in-publish": "^2.0.0", | ||
"jsdoc": "^3.4.3", | ||
"karma": "^2.0.2", | ||
"karma-browserstack-launcher": "^1.3.0", | ||
"karma-chrome-launcher": "^2.2.0", | ||
"karma-detect-browsers": "^2.2.6", | ||
"karma-firefox-launcher": "^1.1.0", | ||
"karma-ie-launcher": "^1.0.0", | ||
"karma-qunit": "^2.0.0", | ||
"karma-safari-launcher": "^1.0.0", | ||
"karma-teamcity-reporter": "^1.1.0", | ||
"mkdirp": "^0.5.1", | ||
"npm-run-all": "^4.1.2", | ||
"qunit": "^2.5.1", | ||
"rimraf": "^2.6.1", | ||
"rollup": "^0.63.2", | ||
"rollup-plugin-babel": "^3.0.4", | ||
"rollup-plugin-commonjs": "^9.1.3", | ||
"rollup-plugin-json": "^3.0.0", | ||
"rollup-plugin-multi-entry": "^2.0.2", | ||
"rollup-plugin-node-resolve": "^3.0.0", | ||
"rollup-plugin-uglify": "^4.0.0", | ||
"jsdoc": "https://github.com/BrandonOCasey/jsdoc#feat/plugin-from-cli", | ||
"karma": "^3.0.0", | ||
"lint-staged": "^7.2.2", | ||
"not-prerelease": "^1.0.1", | ||
"npm-run-all": "^4.1.3", | ||
"rollup": "^0.64.1", | ||
"semver": "^5.1.0", | ||
"serve-static": "^1.13.2", | ||
"sinon": "^5.1.0", | ||
"uglify-es": "^3.3.9", | ||
"shx": "^0.3.2", | ||
"sinon": "^6.1.5", | ||
"videojs-contrib-hls": "^4.1.0", | ||
"videojs-standard": "^6.0.3" | ||
"videojs-generate-karma-config": "~1.0.1", | ||
"videojs-generate-rollup-config": "~1.0.0", | ||
"videojs-standard": "^7.0.1" | ||
}, | ||
@@ -112,3 +94,13 @@ "module": "dist/videojs-contrib-quality-levels.es.js", | ||
"ie 11" | ||
] | ||
], | ||
"lint-staged": { | ||
"*.js": [ | ||
"vjsstandard --fix", | ||
"git add" | ||
], | ||
"README.md": [ | ||
"npm run docs:toc", | ||
"git add" | ||
] | ||
} | ||
} |
@@ -1,165 +0,6 @@ | ||
/* eslint-disable no-console, camelcase */ | ||
const serveStatic = require('serve-static'); | ||
const pkg = require('../package.json'); | ||
const generate = require('videojs-generate-karma-config'); | ||
/* allow static files to be served, note karma will takeover the /test directory */ | ||
const StaticMiddlewareFactory = function(config) { | ||
console.log(`**** static file server started for ${config.basePath} *****`); | ||
const serve = serveStatic( | ||
config.basePath, | ||
{index: ['index.html', 'index.htm']} | ||
); | ||
return function(req, res, next) { | ||
res.setHeader('Cache-Control', 'no-cache,must-revalidate'); | ||
return serve(req, res, next); | ||
}; | ||
}; | ||
/* browsers to run on teamcity */ | ||
const teamcityLaunchers = {}; | ||
/* browsers to run on browserstack */ | ||
const browserstackLaunchers = { | ||
bsChrome: { | ||
base: 'BrowserStack', | ||
browser: 'chrome', | ||
os: 'Windows', | ||
os_version: '10' | ||
}, | ||
bsFirefox: { | ||
base: 'BrowserStack', | ||
browser: 'firefox', | ||
os: 'Windows', | ||
os_version: '10' | ||
}, | ||
bsSafariSierra: { | ||
base: 'BrowserStack', | ||
browser: 'safari', | ||
os: 'OS X', | ||
os_version: 'Sierra' | ||
}, | ||
bsEdgeWin10: { | ||
base: 'BrowserStack', | ||
browser: 'edge', | ||
os: 'Windows', | ||
os_version: '10' | ||
}, | ||
bsIE11Win10: { | ||
base: 'BrowserStack', | ||
browser: 'ie', | ||
browser_version: '11', | ||
os: 'Windows', | ||
os_version: '10' | ||
}, | ||
bsIE11Win7: { | ||
base: 'BrowserStack', | ||
browser: 'ie', | ||
browser_version: '11', | ||
os: 'Windows', | ||
os_version: '7' | ||
} | ||
}; | ||
/* browsers to run on travis */ | ||
const travisLaunchers = { | ||
travisFirefox: { | ||
base: 'Firefox' | ||
}, | ||
travisChrome: { | ||
base: 'Chrome', | ||
flags: ['--no-sandbox'] | ||
} | ||
}; | ||
module.exports = function(config) { | ||
/* Default configuration */ | ||
config.set({ | ||
basePath: '..', | ||
frameworks: ['qunit', 'detectBrowsers'], | ||
customLaunchers: Object.assign( | ||
{}, | ||
travisLaunchers, | ||
teamcityLaunchers, | ||
browserstackLaunchers | ||
), | ||
client: {clearContext: false, qunit: {showUI: true, testTimeout: 5000}}, | ||
detectBrowsers: { | ||
enabled: false, | ||
usePhantomJS: false | ||
}, | ||
browserStack: { | ||
project: process.env.TEAMCITY_PROJECT_NAME || pkg.name, | ||
name: '', | ||
build: process.env.TRAVIS_BUILD_NUMBER || process.env.BUILD_NUMBER, | ||
pollingTimeout: 30000, | ||
captureTimeout: 600, | ||
timeout: 600 | ||
}, | ||
reporters: ['dots'], | ||
files: [ | ||
'node_modules/video.js/dist/video-js.css', | ||
'node_modules/sinon/pkg/sinon.js', | ||
'node_modules/video.js/dist/video.js', | ||
'test/dist/bundle.js' | ||
], | ||
port: 9999, | ||
urlRoot: '/test/', | ||
plugins: [ | ||
{'middleware:static': ['factory', StaticMiddlewareFactory]}, | ||
'karma-*' | ||
], | ||
middleware: ['static'], | ||
colors: true, | ||
autoWatch: false, | ||
singleRun: true, | ||
concurrency: Infinity, | ||
captureTimeout: 30000, | ||
browserNoActivityTimeout: 300000 | ||
}); | ||
/* dynamic configuration, for ci and detectBrowsers */ | ||
// determine what browsers should be run on this environment | ||
if (process.env.BROWSER_STACK_USERNAME) { | ||
config.browsers = Object.keys(browserstackLaunchers); | ||
} else if (process.env.TRAVIS) { | ||
config.browsers = Object.keys(travisLaunchers); | ||
} else if (process.env.TEAMCITY_VERSION) { | ||
config.browsers = Object.keys(teamcityLaunchers); | ||
} | ||
// if running on travis | ||
if (process.env.TRAVIS) { | ||
config.browserStack.name = process.env.TRAVIS_BUILD_NUMBER; | ||
if (process.env.TRAVIS_PULL_REQUEST !== 'false') { | ||
config.browserStack.name += process.env.TRAVIS_PULL_REQUEST; | ||
config.browserStack.name += ' '; | ||
config.browserStack.name += process.env.TRAVIS_PULL_REQUEST_BRANCH; | ||
} | ||
config.browserStack.name += ' ' + process.env.TRAVIS_BRANCH; | ||
// if running on teamcity | ||
} else if (process.env.TEAMCITY_VERSION) { | ||
config.reporters.push('teamcity'); | ||
config.browserStack.name = process.env.TEAMCITY_PROJECT_NAME; | ||
config.browserStack.name += '_'; | ||
config.browserStack.name += process.env.BUILD_NUMBER; | ||
} | ||
// If no browsers are specified, we enable `karma-detect-browsers` | ||
// this will detect all browsers that are available for testing | ||
if (config.browsers !== false && !config.browsers.length) { | ||
config.detectBrowsers.enabled = true; | ||
} | ||
config = generate(config); | ||
// any custom stuff here! | ||
}; |
@@ -1,183 +0,11 @@ | ||
/** | ||
* Rollup configuration for packaging the plugin in various formats. | ||
*/ | ||
const babel = require('rollup-plugin-babel'); | ||
const commonjs = require('rollup-plugin-commonjs'); | ||
const json = require('rollup-plugin-json'); | ||
const multiEntry = require('rollup-plugin-multi-entry'); | ||
const resolve = require('rollup-plugin-node-resolve'); | ||
const {uglify} = require('rollup-plugin-uglify'); | ||
const {minify} = require('uglify-es'); | ||
const pkg = require('../package.json'); | ||
const generate = require('videojs-generate-rollup-config'); | ||
/* to prevent going into a screen during rollup */ | ||
process.stderr.isTTY = false; | ||
// see https://github.com/videojs/videojs-generate-rollup-config | ||
// for options | ||
const options = {}; | ||
const config = generate(options); | ||
let isWatch = false; | ||
// Add additonal builds/customization here! | ||
process.argv.forEach((a) => { | ||
if ((/-w|--watch/).test(a)) { | ||
isWatch = true; | ||
} | ||
}); | ||
/* configuration for plugins */ | ||
const primedPlugins = { | ||
babel: babel({ | ||
babelrc: false, | ||
exclude: 'node_modules/**', | ||
presets: [ | ||
['env', {loose: true, modules: false, targets: {browsers: pkg.browserslist}}] | ||
], | ||
plugins: [ | ||
'external-helpers', | ||
'transform-object-assign' | ||
] | ||
}), | ||
commonjs: commonjs({sourceMap: false}), | ||
json: json(), | ||
multiEntry: multiEntry({exports: false}), | ||
resolve: resolve({browser: true, main: true, jsnext: true}), | ||
uglify: uglify({output: {comments: 'some'}}, minify) | ||
}; | ||
/* General Globals */ | ||
const moduleName = 'videojsContribQualityLevels'; | ||
const pluginName = 'videojs-contrib-quality-levels'; | ||
// globals, aka replace require calls with this | ||
const globals = { | ||
umd: { | ||
'video.js': 'videojs', | ||
'global': 'window', | ||
'global/window': 'window', | ||
'global/document': 'document' | ||
}, | ||
module: { | ||
'video.js': 'videojs' | ||
}, | ||
test: { | ||
'qunit': 'QUnit', | ||
'qunitjs': 'QUnit', | ||
'sinon': 'sinon', | ||
'video.js': 'videojs' | ||
} | ||
}; | ||
// externals, aka don't bundle these and if not | ||
// listed as a global don't require them either | ||
const externals = { | ||
umd: Object.keys(globals.umd).concat([ | ||
]), | ||
module: Object.keys(globals.module).concat([ | ||
'global', | ||
'global/document', | ||
'global/window' | ||
]), | ||
test: Object.keys(globals.test).concat([ | ||
]) | ||
}; | ||
/* plugins that should be used in each bundle with caveats as comments */ | ||
const plugins = { | ||
// note uglify will be added before babel for minified bundle | ||
umd: [ | ||
primedPlugins.resolve, | ||
primedPlugins.json, | ||
primedPlugins.commonjs, | ||
primedPlugins.babel | ||
], | ||
module: [ | ||
primedPlugins.resolve, | ||
primedPlugins.json, | ||
primedPlugins.commonjs, | ||
primedPlugins.babel | ||
], | ||
test: [ | ||
primedPlugins.multiEntry, | ||
primedPlugins.resolve, | ||
primedPlugins.json, | ||
primedPlugins.commonjs, | ||
primedPlugins.babel | ||
] | ||
}; | ||
/* make a build with the specifed settings */ | ||
const makeBuild = (name, settings) => { | ||
const b = Object.assign({}, { | ||
plugins: plugins[name], | ||
external: externals[name], | ||
input: 'src/plugin.js' | ||
}, settings); | ||
const fixOutput = (o) => { | ||
if (!o.banner) { | ||
o.banner = `/*! @name ${pkg.name} @version ${pkg.version} @license ${pkg.license} */`; | ||
} | ||
if (!o.globals) { | ||
o.globals = globals[name]; | ||
} | ||
return o; | ||
}; | ||
if (!Array.isArray(b.output)) { | ||
b.output = fixOutput(b.output); | ||
} else { | ||
b.output = b.output.map(fixOutput); | ||
} | ||
return b; | ||
}; | ||
/* all rollup builds by name. note only object values will be used */ | ||
const builds = { | ||
umd: makeBuild('umd', { | ||
output: [{ | ||
name: moduleName, | ||
file: `dist/${pluginName}.js`, | ||
format: 'umd' | ||
}] | ||
}), | ||
cjs: makeBuild('module', { | ||
output: [{ | ||
file: `dist/${pluginName}.cjs.js`, | ||
format: 'cjs' | ||
}] | ||
}), | ||
es: makeBuild('module', { | ||
output: [{ | ||
file: `dist/${pluginName}.es.js`, | ||
format: 'es' | ||
}] | ||
}), | ||
test: makeBuild('test', { | ||
input: 'test/**/*.test.js', | ||
output: [{ | ||
name: `${moduleName}Tests`, | ||
file: 'test/dist/bundle.js', | ||
format: 'iife' | ||
}] | ||
}) | ||
}; | ||
if (!isWatch) { | ||
builds.minUmd = makeBuild('umd', { | ||
output: [{ | ||
name: moduleName, | ||
file: `dist/${pluginName}.min.js`, | ||
format: 'umd' | ||
}], | ||
// we need to minify before babel | ||
plugins: plugins.umd | ||
.filter((p) => p !== primedPlugins.babel) | ||
.concat([primedPlugins.uglify, primedPlugins.babel]) | ||
}); | ||
} | ||
export default Object.values(builds); | ||
// export the builds to rollup | ||
export default Object.values(config.builds); |
@@ -149,3 +149,3 @@ import videojs from 'video.js'; | ||
* @param {string} id The id of the QualityLevel to find. | ||
* @returns {QualityLevel|null} The QualityLevel with id, or null if not found. | ||
* @return {QualityLevel|null} The QualityLevel with id, or null if not found. | ||
* @method getQualityLevelById | ||
@@ -152,0 +152,0 @@ */ |
@@ -54,3 +54,3 @@ import videojs from 'video.js'; | ||
* | ||
* @returns {boolean} True if the QualityLevel is enabled. | ||
* @return {boolean} True if the QualityLevel is enabled. | ||
*/ | ||
@@ -57,0 +57,0 @@ get() { |
@@ -1,2 +0,2 @@ | ||
/*! @name videojs-contrib-quality-levels @version 2.0.6 @license Apache-2.0 */ | ||
/*! @name videojs-contrib-quality-levels @version 2.0.7 @license Apache-2.0 */ | ||
(function (videojs,QUnit,sinon) { | ||
@@ -126,3 +126,3 @@ 'use strict'; | ||
* | ||
* @returns {boolean} True if the QualityLevel is enabled. | ||
* @return {boolean} True if the QualityLevel is enabled. | ||
*/ | ||
@@ -302,3 +302,3 @@ get: function get$$1() { | ||
* @param {string} id The id of the QualityLevel to find. | ||
* @returns {QualityLevel|null} The QualityLevel with id, or null if not found. | ||
* @return {QualityLevel|null} The QualityLevel with id, or null if not found. | ||
* @method getQualityLevelById | ||
@@ -305,0 +305,0 @@ */ |
@@ -72,4 +72,4 @@ import QUnit from 'qunit'; | ||
assert.strictEqual(this.qualityLevels[this.qualityLevels.selectedIndex], | ||
expected[2], | ||
'selected index properly adjusted on quality level removal'); | ||
expected[2], | ||
'selected index properly adjusted on quality level removal'); | ||
@@ -98,16 +98,16 @@ removed = this.qualityLevels.removeQualityLevel(expected[3]); | ||
assert.strictEqual(this.qualityLevels.getQualityLevelById('0'), | ||
expected[0], | ||
'found quality level with id "0"'); | ||
expected[0], | ||
'found quality level with id "0"'); | ||
assert.strictEqual(this.qualityLevels.getQualityLevelById('1'), | ||
expected[1], | ||
'found quality level with id "1"'); | ||
expected[1], | ||
'found quality level with id "1"'); | ||
assert.strictEqual(this.qualityLevels.getQualityLevelById('2'), | ||
expected[2], | ||
'found quality level with id "2"'); | ||
expected[2], | ||
'found quality level with id "2"'); | ||
assert.strictEqual(this.qualityLevels.getQualityLevelById('3'), | ||
expected[3], | ||
'found quality level with id "3"'); | ||
expected[3], | ||
'found quality level with id "3"'); | ||
assert.strictEqual(this.qualityLevels.getQualityLevelById('4'), | ||
null, | ||
'no quality level with id "4" found'); | ||
null, | ||
'no quality level with id "4" found'); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 9 instances in 1 package
18
1
0
1142430
52
2409