2013-01-12 10:02:20 +03:00
|
|
|
{
|
|
|
|
"name": "video.js",
|
2020-06-05 19:11:38 +02:00
|
|
|
"description": "An HTML5 video player that supports HLS and DASH with a common API and skin.",
|
2024-09-11 00:28:39 +02:00
|
|
|
"version": "8.18.0",
|
2017-05-26 01:40:35 +02:00
|
|
|
"main": "./dist/video.cjs.js",
|
2018-07-03 18:04:41 +02:00
|
|
|
"module": "./dist/video.es.js",
|
2016-08-17 23:16:41 +02:00
|
|
|
"style": "./dist/video-js.css",
|
2022-11-22 00:11:22 +02:00
|
|
|
"types": "./dist/types/video.d.ts",
|
2015-03-12 20:23:47 +02:00
|
|
|
"copyright": "Copyright Brightcove, Inc. <https://www.brightcove.com/>",
|
|
|
|
"license": "Apache-2.0",
|
2014-02-15 03:52:48 +03:00
|
|
|
"keywords": [
|
2020-06-19 20:39:36 +02:00
|
|
|
"dash",
|
2020-06-05 19:11:38 +02:00
|
|
|
"hls",
|
2015-08-03 21:19:36 +02:00
|
|
|
"html5",
|
|
|
|
"player",
|
2014-02-15 03:52:48 +03:00
|
|
|
"video",
|
2015-08-03 21:19:36 +02:00
|
|
|
"videojs"
|
2014-02-15 03:52:48 +03:00
|
|
|
],
|
2018-08-10 21:13:32 +02:00
|
|
|
"homepage": "https://videojs.com",
|
2013-01-12 10:02:20 +03:00
|
|
|
"author": "Steve Heffernan",
|
|
|
|
"scripts": {
|
2018-11-30 23:37:29 +02:00
|
|
|
"sandbox": "node build/sandbox.js",
|
|
|
|
"prestart": "npm-run-all sandbox",
|
|
|
|
"start": "npm-run-all -p watch karma-server",
|
2019-08-07 22:06:14 +02:00
|
|
|
"clean": "shx rm -rf ./dist ./test/dist ./docs/api ./lang/zh-Han*.json",
|
2018-11-30 23:37:29 +02:00
|
|
|
"postclean": "shx mkdir -p ./dist/lang ./test/dist",
|
|
|
|
"changelog": "conventional-changelog -p videojs -i CHANGELOG.md -s",
|
|
|
|
"build": "npm-run-all build-dev minify copy zip",
|
2022-11-22 00:11:22 +02:00
|
|
|
"build-dev": "npm-run-all clean lint-errors build:js build:css build:lang build:test build:types",
|
2018-11-30 23:37:29 +02:00
|
|
|
"build:test": "npm-run-all build:test:*",
|
|
|
|
"build:test:a11y": "shx cp sandbox/descriptions.html.example sandbox/descriptions.test-a11y.html",
|
|
|
|
"build:test:browserify": "browserify test/require/browserify.js -o test/dist/browserify.js",
|
|
|
|
"build:test:webpack": "webpack --hide-modules test/require/webpack.js test/dist/webpack.js",
|
|
|
|
"copy": "npm-run-all copy:*",
|
|
|
|
"copy:fonts": "shx cp -R node_modules/videojs-font/fonts dist/font",
|
|
|
|
"copy:examples": "shx cp -R docs/examples dist/",
|
|
|
|
"build:js": "rollup -c",
|
|
|
|
"build:css": "npm-run-all build:css:*",
|
2024-04-12 18:54:17 +02:00
|
|
|
"build:css:cdn": "sass --load-path=\"./\" --load-path=\"./node_modules/\" --no-source-map src/css/vjs-cdn.scss dist/alt/video-js-cdn.css",
|
2022-11-22 00:11:22 +02:00
|
|
|
"build:types": "tsc",
|
2018-11-30 23:37:29 +02:00
|
|
|
"postbuild:css:cdn": "postcss --verbose --config postcss.config.js -d dist/alt dist/alt/video-js-cdn.css",
|
2024-04-12 18:54:17 +02:00
|
|
|
"build:css:default": "sass --load-path=\"./\" --load-path=\"./node_modules/\" --no-source-map src/css/vjs.scss dist/video-js.css",
|
2018-11-30 23:37:29 +02:00
|
|
|
"postbuild:css:default": "postcss --verbose --config postcss.config.js -d dist/ dist/video-js.css",
|
2019-08-07 22:06:14 +02:00
|
|
|
"prebuild:lang": "npm-run-all -s prebuild:lang:*",
|
|
|
|
"prebuild:lang:chinese-s": "shx cp lang/zh-CN.json lang/zh-Hans.json",
|
|
|
|
"prebuild:lang:chinese-t": "shx cp lang/zh-TW.json lang/zh-Hant.json",
|
|
|
|
"build:lang": "vjslang --dir dist/lang",
|
|
|
|
"postbuild:lang": "shx cp -R lang/* dist/lang/",
|
2018-11-30 23:37:29 +02:00
|
|
|
"minify": "npm-run-all minify:*",
|
2019-08-30 20:14:53 +02:00
|
|
|
"minify:js": "node build/minify.js",
|
2018-11-30 23:37:29 +02:00
|
|
|
"minify:css": "npm-run-all minify:css:*",
|
|
|
|
"minify:css:cdn": "cleancss dist/alt/video-js-cdn.css -o dist/alt/video-js-cdn.min.css",
|
|
|
|
"minify:css:default": "cleancss dist/video-js.css -o dist/video-js.min.css",
|
2018-10-25 21:45:08 +02:00
|
|
|
"watch": "npm-run-all -p watch:*",
|
2023-06-06 23:24:30 +02:00
|
|
|
"watch:lang": "chokidar --initial \"lang/**/!(zh-Hans|zh-Hant)*.json\" -c \"npm run build:lang\"",
|
2018-11-30 23:37:29 +02:00
|
|
|
"watch:rollup": "rollup -c -w --no-progress",
|
2022-11-22 00:11:22 +02:00
|
|
|
"watch:types": "tsc -w",
|
2019-04-29 18:01:37 +02:00
|
|
|
"watch:css": "npm-run-all -p build:css:default build:css:cdn watch:css:*",
|
2019-06-17 23:31:32 +02:00
|
|
|
"watch:css:default": "npm run build:css:default -- --watch",
|
|
|
|
"watch:css:cdn": "npm run build:css:cdn -- --watch",
|
2017-05-26 01:40:35 +02:00
|
|
|
"assets": "node build/assets.js",
|
2016-07-25 15:49:38 +02:00
|
|
|
"lint": "vjsstandard",
|
2018-11-30 23:37:29 +02:00
|
|
|
"lint-errors": "vjsstandard --errors",
|
2018-10-31 17:01:30 +02:00
|
|
|
"karma-server": "karma start test/karma.conf.js --singleRun=false --auto-watch",
|
2024-04-12 18:54:17 +02:00
|
|
|
"posttest": "[ \"$CI_TEST_TYPE\" != \"coverage\" ] || shx cat test/dist/coverage/text.txt",
|
2018-11-30 23:37:29 +02:00
|
|
|
"pretest": "npm run build-dev",
|
|
|
|
"test": "npm-run-all -p test:*",
|
|
|
|
"test:node-require": "node test/require/node.js",
|
|
|
|
"test:a11y": "node build/test-a11y.js",
|
|
|
|
"test:unit": "karma start test/karma.conf.js",
|
|
|
|
"docs": "npm-run-all clean docs:lint docs:api",
|
2024-05-15 15:02:01 +02:00
|
|
|
"docs:api": "jsdoc -c .jsdoc.js",
|
2017-03-21 23:13:06 +02:00
|
|
|
"postdocs:api": "node ./build/fix-api-docs.js",
|
2024-04-12 18:54:17 +02:00
|
|
|
"docs:lint": "remark -- \"./{,!(node_modules)/**/}!(CHANGELOG)*.md\"",
|
|
|
|
"docs:fix": "remark --output -- \"./{,!(node_modules)/**/}!(CHANGELOG)*.md\"",
|
2018-11-30 23:37:29 +02:00
|
|
|
"docs:lang": "node build/translations.js",
|
2021-01-20 01:47:48 +02:00
|
|
|
"netlify": "node ./build/netlify.js",
|
|
|
|
"netlify-docs": "node ./build/netlify-docs.js",
|
2018-10-11 23:29:06 +02:00
|
|
|
"prepublishOnly": "run-p build",
|
2024-08-28 12:39:46 +02:00
|
|
|
"version": "is-prerelease || npm run changelog && node build/readme-version.js && git add CHANGELOG.md README.md",
|
2018-11-16 19:28:44 +02:00
|
|
|
"zip": "cd dist && cross-env bestzip \"./video-js-${npm_package_version}.zip\" * && cd .."
|
2013-01-12 10:02:20 +03:00
|
|
|
},
|
|
|
|
"repository": {
|
|
|
|
"type": "git",
|
2014-02-19 00:31:18 +03:00
|
|
|
"url": "https://github.com/videojs/video.js.git"
|
2013-01-12 10:02:20 +03:00
|
|
|
},
|
2014-01-24 02:44:52 +03:00
|
|
|
"dependencies": {
|
2021-06-08 17:01:04 +02:00
|
|
|
"@babel/runtime": "^7.12.5",
|
2024-09-11 00:24:20 +02:00
|
|
|
"@videojs/http-streaming": "^3.14.1",
|
2024-09-09 21:08:55 +02:00
|
|
|
"@videojs/vhs-utils": "^4.1.1",
|
2024-06-07 01:03:30 +02:00
|
|
|
"@videojs/xhr": "2.7.0",
|
2024-09-09 21:08:55 +02:00
|
|
|
"aes-decrypter": "^4.0.2",
|
2022-11-22 03:39:52 +02:00
|
|
|
"global": "4.4.0",
|
2024-09-09 21:08:55 +02:00
|
|
|
"m3u8-parser": "^7.2.0",
|
2023-11-30 10:59:58 +02:00
|
|
|
"mpd-parser": "^1.2.2",
|
2023-10-12 19:56:46 +02:00
|
|
|
"mux.js": "^7.0.1",
|
2024-03-06 22:04:39 +02:00
|
|
|
"videojs-contrib-quality-levels": "4.1.0",
|
2024-06-11 18:58:29 +02:00
|
|
|
"videojs-font": "4.2.0",
|
2023-07-20 18:38:15 +02:00
|
|
|
"videojs-vtt.js": "0.15.5"
|
2014-01-24 02:44:52 +03:00
|
|
|
},
|
2013-01-12 10:02:20 +03:00
|
|
|
"devDependencies": {
|
2020-03-24 17:04:01 +02:00
|
|
|
"@babel/core": "^7.9.0",
|
|
|
|
"@babel/plugin-transform-runtime": "^7.9.0",
|
|
|
|
"@babel/preset-env": "^7.9.0",
|
2023-06-12 20:31:06 +02:00
|
|
|
"@rollup/plugin-image": "^3.0.2",
|
2021-03-09 18:41:01 +02:00
|
|
|
"@rollup/plugin-replace": "^2.4.1",
|
fix(types): Add has|usingPlugin to typedef by adding stubs which are removed from builds (#8811)
## Description
tsc doesn't understand mixins and ignores jsdoc not followed by code.
The jsdoc for the plugin methods `usingPlugin()` and `hasPlugin()` in
Player are being ignored. To get them included in type outputs we need
to have otherwise unnecessary stubs codes, as we already have for `on()`
etc, which adds unnecessary, even if a small amount of, code to the
outputs.
## Specific Changes proposed
* Slight refactor of Player to include those stubs.
* Adds a rollup plugin to delete lines between certain comments, so
those stubs are deleted from the outputs.
* Applies those comments to the `on()` etc stubs in Component and the
new plugin stubs in Player.
Any code surrounded by these comments, and the comments themselves, is
deleted from the dist and test builds:
```js
/* start-delete-from-build */
console.log('hi');
/* start-delete-from-build */
```
Compared to main, video.min.js is 53 bytes smaller.
## Requirements Checklist
- [ ] Feature implemented / Bug fixed
- [ ] If necessary, more likely in a feature request than a bug fix
- [ ] Change has been verified in an actual browser (Chrome, Firefox,
IE)
- [ ] Unit Tests updated or fixed
- [ ] Docs/guides updated
- [ ] Example created ([starter template on
JSBin](https://codepen.io/gkatsev/pen/GwZegv?editors=1000#0))
- [ ] Has no DOM changes which impact accessiblilty or trigger warnings
(e.g. Chrome issues tab)
- [ ] Has no changes to JSDoc which cause `npm run docs:api` to error
- [ ] Reviewed by Two Core Contributors
2024-08-12 21:47:47 +02:00
|
|
|
"@rollup/pluginutils": "^5.1.0",
|
2022-11-22 00:11:22 +02:00
|
|
|
"@types/node": "^18.8.3",
|
2018-11-16 19:13:19 +02:00
|
|
|
"access-sniff": "^3.2.0",
|
2021-05-04 17:45:59 +02:00
|
|
|
"autoprefixer": "^10.2.5",
|
|
|
|
"bestzip": "^2.2.0",
|
2018-10-31 17:01:30 +02:00
|
|
|
"browserify": "^16.2.3",
|
2021-05-04 17:45:59 +02:00
|
|
|
"chokidar-cli": "^2.1.0",
|
2019-06-11 16:54:33 +02:00
|
|
|
"clean-css-cli": "^4.3.0",
|
2023-03-22 21:15:17 +02:00
|
|
|
"clean-jsdoc-theme": "^4.2.1",
|
2017-05-26 01:40:35 +02:00
|
|
|
"cli-table": "^0.3.1",
|
2019-06-11 16:54:33 +02:00
|
|
|
"conventional-changelog-cli": "^2.0.21",
|
2021-05-04 17:45:59 +02:00
|
|
|
"conventional-changelog-videojs": "^3.0.1",
|
|
|
|
"cross-env": "^7.0.3",
|
|
|
|
"es5-shim": "^4.5.15",
|
|
|
|
"es6-shim": "^0.35.6",
|
2019-06-11 16:54:33 +02:00
|
|
|
"filesize": "^4.1.2",
|
2022-10-03 23:34:39 +02:00
|
|
|
"gh-release": "^6.0.4",
|
2021-05-04 17:45:59 +02:00
|
|
|
"humanize-duration": "^3.26.0",
|
|
|
|
"husky": "^1.3.1",
|
|
|
|
"is-ci": "^3.0.0",
|
2024-05-15 15:02:01 +02:00
|
|
|
"jsdoc": "^4.0.3",
|
2024-05-30 21:14:52 +02:00
|
|
|
"karma": "^6.4.3",
|
2021-05-04 17:45:59 +02:00
|
|
|
"lint-staged": "^10.5.4",
|
2019-06-11 16:54:33 +02:00
|
|
|
"markdown-table": "^1.1.3",
|
2018-04-19 19:23:53 +02:00
|
|
|
"maxmin": "^2.1.0",
|
2019-08-30 20:14:53 +02:00
|
|
|
"not-prerelease": "^1.0.1",
|
2021-05-04 17:45:59 +02:00
|
|
|
"npm-merge-driver-install": "^2.0.1",
|
2018-11-26 19:19:01 +02:00
|
|
|
"npm-run-all": "^4.1.5",
|
2021-05-04 17:45:59 +02:00
|
|
|
"postcss": "^8.2.13",
|
|
|
|
"postcss-cli": "^8.3.1",
|
|
|
|
"qunit": "2.13.0",
|
2023-02-01 18:48:25 +02:00
|
|
|
"remark-cli": "^6.0.1",
|
|
|
|
"remark-lint": "^6.0.6",
|
|
|
|
"remark-parse": "^6.0.3",
|
2018-12-03 22:00:51 +02:00
|
|
|
"remark-stringify": "^6.0.4",
|
|
|
|
"remark-toc": "^5.1.1",
|
2019-06-11 16:54:33 +02:00
|
|
|
"remark-validate-links": "^8.0.2",
|
2021-05-04 17:45:59 +02:00
|
|
|
"replace": "^1.2.1",
|
2020-03-25 23:55:59 +02:00
|
|
|
"rollup": "^2.2.0",
|
2019-06-11 16:54:33 +02:00
|
|
|
"rollup-plugin-alias": "^1.5.2",
|
2020-03-24 17:04:01 +02:00
|
|
|
"rollup-plugin-babel": "^4.4.0",
|
2019-06-11 16:54:33 +02:00
|
|
|
"rollup-plugin-commonjs": "^9.3.4",
|
2021-09-22 18:55:17 +02:00
|
|
|
"rollup-plugin-external-globals": "^0.6.1",
|
2019-06-11 16:54:33 +02:00
|
|
|
"rollup-plugin-ignore": "^1.0.5",
|
2021-07-06 20:56:02 +02:00
|
|
|
"rollup-plugin-istanbul": "^3.0.0",
|
2018-12-03 22:00:51 +02:00
|
|
|
"rollup-plugin-json": "^3.1.0",
|
2019-08-30 20:56:41 +02:00
|
|
|
"rollup-plugin-multi-entry": "^2.0.2",
|
2020-03-24 17:04:01 +02:00
|
|
|
"rollup-plugin-node-resolve": "^4.2.4",
|
2021-05-04 17:45:59 +02:00
|
|
|
"rollup-plugin-progress": "^1.1.2",
|
2019-08-30 20:56:41 +02:00
|
|
|
"rollup-plugin-stub": "^1.2.0",
|
2023-06-12 20:31:06 +02:00
|
|
|
"rollup-plugin-svg": "^2.0.0",
|
2021-06-02 19:13:00 +02:00
|
|
|
"sass": "^1.34.0",
|
2019-06-11 16:54:33 +02:00
|
|
|
"semver": "^5.7.0",
|
2022-10-03 23:34:39 +02:00
|
|
|
"shelljs": "^0.8.5",
|
2018-11-08 21:02:07 +02:00
|
|
|
"shx": "^0.3.2",
|
2021-07-06 20:56:02 +02:00
|
|
|
"sinon": "^11.1.1",
|
2024-06-23 14:19:13 +02:00
|
|
|
"typescript": "^5.5.2",
|
fix: Refactor evented to make mincompatable with Chrome 53 (#8810)
## Description
Chrome 53 doesn't like the minified output. Specifically, it throws
`Uncaught SyntaxError: Unexpected token (` on the ternary in the
minified version of `normalizeListenArgs()`
https://github.com/videojs/video.js/blob/e78bcc7b2d829fce01451cf105b918d8feec4548/src/js/mixins/evented.js#L165-L195
Line breaks added for clarify
```js
Tt = (e, t, s) => {
var i = t.length < 3 || t[0] === e || t[0] === e.eventBusEl_;
let r, n, a;
return i ? (r = e.eventBusEl_, 3 <= t.length && t.shift(), [n, a] = t) : [r, n, a] = t, ft(r, e, s), yt(n, e, s), bt(a, e, s), a = _(e, a), {
isTargetingSelf: I,
target: r,
type: n,
listener: a
}
},
```
Chrome would be happy with this if `[r, n, a] = t` were `([r, n, a] =
t)`.
## Specific Changes proposed
Refactor `normalizeListenArgs()` slightly to use multiple statements to
coerce uglify-js to include parentheses.
Also updates uglify-js, but that in itself isn't the fix.
Fixes #8783
## Requirements Checklist
- [x] Feature implemented / Bug fixed
- [ ] If necessary, more likely in a feature request than a bug fix
- [x] Change has been verified in an actual browser - Browserstack
Chrome 53
- [ ] Unit Tests updated or fixed
- [ ] Docs/guides updated
- [ ] Example created ([starter template on
JSBin](https://codepen.io/gkatsev/pen/GwZegv?editors=1000#0))
- [x] Has no DOM changes which impact accessiblilty or trigger warnings
(e.g. Chrome issues tab)
- [x] Has no changes to JSDoc which cause `npm run docs:api` to error
- [ ] Reviewed by Two Core Contributors
---------
Co-authored-by: Gary Katsevman <git@gkatsev.com>
2024-07-22 22:16:17 +02:00
|
|
|
"uglify-js": "^3.19.0",
|
2018-12-03 22:00:51 +02:00
|
|
|
"unified": "^7.0.2",
|
2024-05-30 21:14:52 +02:00
|
|
|
"videojs-generate-karma-config": "^8.1.0",
|
2018-11-16 19:13:19 +02:00
|
|
|
"videojs-languages": "^2.0.0",
|
2022-10-03 23:34:39 +02:00
|
|
|
"videojs-standard": "^9.0.1",
|
2017-05-26 01:40:35 +02:00
|
|
|
"webpack": "^1.15.0"
|
2015-05-01 21:48:28 +02:00
|
|
|
},
|
2016-07-25 15:49:38 +02:00
|
|
|
"vjsstandard": {
|
2015-05-01 21:48:28 +02:00
|
|
|
"ignore": [
|
2019-08-30 20:14:53 +02:00
|
|
|
"dist",
|
|
|
|
"docs",
|
2019-08-30 20:56:55 +02:00
|
|
|
"sandbox",
|
2019-08-30 20:14:53 +02:00
|
|
|
"test/dist",
|
|
|
|
"test/api",
|
2019-11-15 20:44:11 +02:00
|
|
|
"core.js",
|
|
|
|
"core.es.js"
|
2015-05-01 21:48:28 +02:00
|
|
|
]
|
2017-03-30 19:46:41 +02:00
|
|
|
},
|
2018-09-28 22:06:06 +02:00
|
|
|
"husky": {
|
|
|
|
"hooks": {
|
2018-11-16 07:04:11 +02:00
|
|
|
"pre-commit": "lint-staged"
|
2018-09-28 22:06:06 +02:00
|
|
|
}
|
2018-11-16 07:04:11 +02:00
|
|
|
},
|
|
|
|
"lint-staged": {
|
|
|
|
"*.js": [
|
2021-05-04 17:45:59 +02:00
|
|
|
"vjsstandard --fix"
|
2019-08-30 20:14:53 +02:00
|
|
|
],
|
|
|
|
"!(CHANGELOG)*.md": [
|
2021-05-04 17:45:59 +02:00
|
|
|
"remark --output --"
|
2019-08-30 20:14:53 +02:00
|
|
|
],
|
|
|
|
"lang/**/!(zh-Hans|zh-Hant)*.json": [
|
2021-05-04 17:45:59 +02:00
|
|
|
"node build/translations.js"
|
2018-11-16 07:04:11 +02:00
|
|
|
]
|
2013-01-12 10:02:20 +03:00
|
|
|
}
|
|
|
|
}
|