rx-player
Version:
Canal+ HTML5 Video Player
322 lines (321 loc) • 16.7 kB
JSON
{
"name": "rx-player",
"author": "Canal+",
"version": "4.3.0",
"description": "Canal+ HTML5 Video Player",
"main": "./dist/commonjs/index.js",
"module": "./dist/es2017/index.js",
"browser": "./dist/es2017/index.js",
"exports": {
".": {
"import": "./dist/es2017/index.js",
"require": "./dist/commonjs/index.js",
"default": "./dist/es2017/index.js"
},
"./experimental": {
"import": "./dist/es2017/experimental/index.js",
"require": "./dist/commonjs/experimental/index.js",
"default": "./dist/es2017/experimental/index.js"
},
"./experimental/config": {
"import": "./dist/es2017/config.js",
"require": "./dist/commonjs/config.js",
"default": "./dist/es2017/config.js"
},
"./experimental/features": {
"import": "./dist/es2017/experimental/features/index.js",
"require": "./dist/commonjs/experimental/features/index.js",
"default": "./dist/es2017/experimental/features/index.js"
},
"./experimental/features/embeds": {
"import": "./dist/es2017/__GENERATED_CODE/index.js",
"require": "./dist/commonjs/__GENERATED_CODE/index.js",
"default": "./dist/es2017/__GENERATED_CODE/index.js"
},
"./experimental/features/*": {
"import": "./dist/es2017/experimental/features/*.js",
"require": "./dist/commonjs/experimental/features/*.js",
"default": "./dist/es2017/experimental/features/*.js"
},
"./experimental/tools": {
"import": "./dist/es2017/experimental/tools/index.js",
"require": "./dist/commonjs/experimental/tools/index.js",
"default": "./dist/es2017/experimental/tools/index.js"
},
"./experimental/tools/*": {
"import": "./dist/es2017/experimental/tools/*/index.js",
"require": "./dist/commonjs/experimental/tools/*/index.js",
"default": "./dist/es2017/experimental/tools/*/index.js"
},
"./features": {
"import": "./dist/es2017/features/list/index.js",
"require": "./dist/commonjs/features/list/index.js",
"default": "./dist/es2017/features/list/index.js"
},
"./features/*": {
"import": "./dist/es2017/features/list/*.js",
"require": "./dist/commonjs/features/list/*.js",
"default": "./dist/es2017/features/list/*.js"
},
"./logger": {
"import": "./dist/es2017/log.js",
"require": "./dist/commonjs/log.js",
"default": "./dist/es2017/log.js"
},
"./minimal": {
"import": "./dist/es2017/minimal.js",
"require": "./dist/commonjs/minimal.js",
"default": "./dist/es2017/minimal.js"
},
"./tools": {
"import": "./dist/es2017/tools/index.js",
"require": "./dist/commonjs/tools/index.js",
"default": "./dist/es2017/tools/index.js"
},
"./tools/*": {
"import": "./dist/es2017/tools/*/index.js",
"require": "./dist/commonjs/tools/*/index.js",
"default": "./dist/es2017/tools/*/index.js"
},
"./types": {
"import": "./dist/es2017/public_types.js",
"require": "./dist/commonjs/public_types.js",
"default": "./dist/es2017/public_types.js"
},
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
"experimental": [
"./dist/es2017/experimental/index.d.ts"
],
"experimental/features": [
"./dist/es2017/experimental/features/index.d.ts"
],
"experimental/features/embeds": [
"./dist/es2017/__GENERATED_CODE/index.d.ts"
],
"experimental/features/*": [
"./dist/es2017/experimental/features/*.d.ts"
],
"experimental/tools": [
"./dist/es2017/experimental/tools/index.d.ts"
],
"experimental/tools/*": [
"./dist/es2017/experimental/tools/*/index.d.ts"
],
"features": [
"./dist/es2017/features/list/index.d.ts"
],
"features/*": [
"./dist/es2017/features/list/*.d.ts"
],
"logger": [
"./dist/es2017/log.d.ts"
],
"minimal": [
"./dist/es2017/minimal.d.ts"
],
"tools": [
"./dist/es2017/tools/index.d.ts"
],
"tools/*": [
"./dist/es2017/tools/*/index.d.ts"
],
"types": [
"./dist/es2017/public_types.d.ts"
]
}
},
"keywords": [
"dash",
"eme",
"hss",
"html5",
"mediasource",
"mse",
"reactive",
"smooth",
"streaming",
"typescript",
"video"
],
"homepage": "https://github.com/canalplus/rx-player",
"bugs": "https://github.com/canalplus/rx-player/issues",
"license": "Apache-2.0",
"sideEffects": false,
"scripts": {
"build": "node ./scripts/generate_build.mjs",
"build:noCheck": "node ./scripts/generate_build.mjs --no-check",
"build:all": "npm run clean:build && npm run build:wasm:release && npm run bundle && npm run bundle:min && npm run build",
"build:dev": "node ./scripts/generate_build.mjs --dev-mode",
"build:dev:noCheck": "node ./scripts/generate_build.mjs --dev-mode --no-check",
"build:wasm:debug": "mkdir -p dist && cd ./src/parsers/manifest/dash/wasm-parser && cargo build --target wasm32-unknown-unknown && cp target/wasm32-unknown-unknown/debug/mpd_node_parser.wasm ../../../../../dist/mpd-parser.wasm",
"build:wasm:release": "bash ./scripts/build_wasm_release.sh",
"bundle": "node ./scripts/run_bundler.mjs src/index.ts --production-mode --globals -o dist/rx-player.js",
"bundle:min": "node ./scripts/run_bundler.mjs src/index.ts --production-mode --globals -o dist/rx-player.min.js --minify",
"bundle:min:watch": "node ./scripts/run_bundler.mjs src/index.ts --production-mode --globals -o dist/rx-player.min.js --minify --watch",
"bundle:watch": "node ./scripts/run_bundler.mjs src/index.ts --production-mode --globals -o dist/rx-player.js --watch",
"certificate": "bash ./scripts/generate_certificate",
"check": "npm run check:types && npm run lint && npm run check:types:unit_tests",
"check:all": "npm run check:types && npm run lint && npm run lint:demo && npm run lint:tests && npm run lint:scripts && npm run test:unit && npm run test:integration && npm run test:memory && node -r esm ./scripts/check_nodejs_import_compatibility.js",
"check:demo": "npm run check:demo:types && npm run lint:demo",
"check:demo:types": "tsc --noEmit --project demo/",
"clean:build": "node ./scripts/utils/remove_dir.mjs dist",
"check:types": "tsc --noEmit --project .",
"check:types:unit_tests": "tsc --noEmit --project ./tsconfig.unit-tests.json",
"check:types:watch": "tsc --noEmit --watch --project .",
"clean:wasm": "node scripts/utils/remove_dir.mjs dist/mpd-parser.wasm && node scripts/utis/remove_dir.mjs ./src/parsers/manifest/dash/wasm-parser/target",
"demo": "node ./scripts/build_demo.mjs --production-mode",
"demo:min": "node ./scripts/build_demo.mjs --production-mode --minify",
"demo:watch": "node ./scripts/build_demo.mjs --watch --production-mode",
"doc": "readme.doc --clean --input doc/ --output doc/generated -p \"$(cat VERSION)\"",
"fmt:prettier": "prettier --write .",
"fmt:prettier:check": "prettier . --check",
"fmt:rust": "cd ./src/parsers/manifest/dash/wasm-parser && cargo fmt",
"fmt:rust:check": "cd ./src/parsers/manifest/dash/wasm-parser && cargo fmt --check",
"lint": "eslint src -c eslint.config.mjs",
"lint:all": "npm run lint && npm run lint:demo && npm run lint:scripts && npm run lint:tests",
"lint:demo": "eslint -c demo/eslint.config.mjs demo/scripts",
"lint:scripts": "eslint -c scripts/eslint.config.mjs --ext .js --ext .mjs --ext .cjs scripts",
"lint:tests": "eslint -c tests/eslint.config.mjs tests",
"list": "node scripts/list-npm-scripts.mjs",
"prepublishOnly": "npm run build:all",
"releases:changelog": "node ./scripts/update_changelog.mjs",
"releases:demo": "bash ./scripts/update_gh-pages_demo",
"releases:dev": "bash ./scripts/make-dev-releases",
"releases:doc": "bash ./scripts/update_gh-pages_doc",
"releases:official": "bash ./scripts/make-official-release.sh",
"start": "node ./scripts/start_demo_web_server.mjs",
"start:wasm": "node ./scripts/start_demo_web_server.mjs --include-wasm",
"test:integration": "npm run test:integration:chrome && npm run test:integration:firefox",
"test:integration:chrome": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=chrome vitest run tests/integration/scenarios",
"test:integration:chrome:watch": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=chrome vitest watch tests/integration/scenarios",
"test:integration:edge": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=edge vitest run tests/integration/scenarios",
"test:integration:edge:watch": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=edge vitest watch tests/integration/scenarios",
"test:integration:firefox": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=firefox vitest run tests/integration/scenarios",
"test:integration:firefox:watch": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=firefox vitest watch tests/integration/scenarios",
"test:integration:notice": "echo \"~~~ ⚠️ NOTICE ⚠️\n~~~ Integration tests rely on the RxPlayer build.\n~~~ Make sure you called the \\`build\\` script succesfully first.\n\"",
"test:memory": "cross-env BROWSER_CONFIG=chrome vitest run tests/memory",
"test:memory:chrome:watch": "cross-env BROWSER_CONFIG=chrome vitest watch tests/memory",
"test:unit": "vitest --config vitest.config.unit.mjs",
"test:unit:watch": "cross-env WATCH=true vitest --config vitest.config.unit.mjs",
"update-version": "npm run version --git-tag-version=false",
"version": "bash ./scripts/update-version",
"wasm-strip": "node scripts/wasm-strip.mjs dist/mpd-parser.wasm"
},
"repository": {
"type": "git",
"url": "git://github.com/canalplus/rx-player.git"
},
"devDependencies": {
"@canalplus/readme.doc": "0.6.0",
"@eslint/js": "^9.23.0",
"@types/react": "19.0.12",
"@types/react-dom": "19.0.4",
"@typescript-eslint/eslint-plugin": "^8.28.0",
"@typescript-eslint/parser": "^8.28.0",
"@vitest/browser": "^3.0.9",
"core-js": "3.41.0",
"cross-env": "^7.0.3",
"esbuild": "0.25.1",
"eslint": "9.23.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-ban": "2.0.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsdoc": "50.6.9",
"eslint-plugin-react": "7.37.4",
"esm": "3.2.25",
"github-buttons": "2.29.1",
"html-entities": "2.5.3",
"jsdom": "^26.0.0",
"prettier": "^3.5.3",
"react": "19.0.0",
"react-dom": "19.0.0",
"regenerator-runtime": "0.14.1",
"semver": "7.7.1",
"typescript": "5.8.2",
"typescript-eslint": "^8.28.0",
"vitest": "3.0.9",
"webdriverio": "9.12.1"
},
"scripts-list": {
" INFO ": "---- This field is read by the `list` npm script and allows to guide you through the RxPlayer's npm scripts ----",
"Build a demo page (e.g. to test a code change)": {
"start": "Build the demo with the non-minified RxPlayer and serve it on a local server. Re-build on file updates.",
"start:wasm": "Build the demo with the non-minified RxPlayer including the DASH WebAssembly MPD parser and serve it on a local server. Re-build on file updates.",
"demo": "Build the demo in demo/bundle.js",
"demo:min": "Build the demo and minify it in demo/bundle.js",
"demo:watch": "Build the demo in demo/bundle.js each times the files update.",
"check:demo": "Check the validity of the demo directory by running the type checker and linter on it",
"check:demo:types": "Check TypeScript types in demo files",
"lint:demo": "Run linter on demo files",
"certificate": "Generate a certificate to be able to use HTTPS locally for the demo pages (`npm run start` will then listen to HTTPS requests through a communicated port)",
"releases:demo": "Publish current demo as the GitHub's pages new demo page (\"stable\" branch only)"
},
"Type-check, format, or lint the current code": {
"check": "Check the validity of the src directory by running the type checker and linter on it",
"check:all": "Check the validity of the whole project by running linters, type checkers and every tests",
"check:types": "Check TypeScript typings in src",
"check:types:watch": "Check TypeScript typings in src each time files change",
"lint": "Lint rx-player source files",
"lint:all": "Lint all RxPlayer JS files, including scripts, demo, integration tests etc.",
"lint:demo": "Lint demo source files",
"lint:scripts": "Lint our JS scripts in the scripts/ directory",
"lint:tests": "Lint integration tests source files",
"fmt:prettier": "Automatically format JavaScript, TypeScript, JSON, XML, HTML, YML and Markdown files",
"fmt:prettier:check": "Check that JavaScript, TypeScript, JSON, XML, HTML, YML and Markdown files are well-formatted",
"fmt:rust": "Automatically format Rust files",
"fmt:rust:check": "Check that Rust files are well-formatted"
},
"Run tests": {
"Integration tests (test the whole API, call the `build` script BEFORE running them)": {
"test:integration": "Launch integration tests in multiple browser environments",
"test:integration:chrome": "Launch integration tests in a Chrome browser.",
"test:integration:chrome:watch": "Launch integration tests in Chrome each times the files update",
"test:integration:firefox": "Launch integration tests in a Firefox browser.",
"test:integration:firefox:watch": "Launch integration tests in Firefox each times the files update",
"test:integration:Edge": "Launch integration tests in an Edge browser.",
"test:integration:Edge:watch": "Launch integration tests in Edge each times the files update"
},
"Unit tests (test particular functions)": {
"test:unit": "Launch unit tests",
"test:unit:watch": "Launch unit tests and restart them each one of its file changes"
},
"Memory tests (test memory usage to avoid memory leaks)": {
"test:memory": "Launch memory tests",
"test:memory:chrome:watch": "Launch memory tests in Chrome each times the files update"
}
},
"Build the player or one of its sub-parts": {
"Regular builds (used by JS bundlers)": {
"build": "Build the rx-player code in release mode",
"build:dev": "Build the rx-player code in development mode (more runtime checks, non-minified worker)",
"build:noCheck": "Build the rx-player code in release mode without performing compile-time type checks",
"build:dev:noCheck": "Build the rx-player code in development mode (more runtime checks, non-minified worker) without performing compile-time type checks"
},
"Legacy bundle builds (single-file bundles exporting to window.RxPlayer)": {
"bundle": "Build the player in dist/rx-player.js",
"bundle:min": "Build the player and minify it in dist/rx-player.min.js",
"bundle:min:watch": "Build the player in dist/rx-player.js each times the files update",
"bundle:watch": "Build the player as a minified version in dist/rx-player.min.js each times the files update"
},
"WebAssembly MPD parser builds (needs Rust, Cargo and binaryen)": {
"build:wasm:debug": "Build the DASH MPD parser written in rust as WebAssembly into debug mode, and output the result as dist/mpd-parser.wasm",
"build:wasm:release": "Build the DASH MPD parser written in rust as WebAssembly into release mode, and output the result as dist/mpd-parser.wasm"
},
"Combinations of multiple builds": {
"build:all": "Perform all possible builds of the player (regular RxPlayer builds, legacy bundles and the WebAssembly DASH MPD parser release build)."
}
},
"Build the documentation pages": {
"doc": "Generate the HTML documentation in doc/generated/pages",
"releases:doc": "Publish current documentation as the GitHub's pages new documentation pages (\"stable\" branch only)"
},
"Make a release": {
"releases:dev": "Produce dev npm releases (which are tagged pre-releases on npm) from the current branch.",
"releases:official": "Produce a new official release of the RxPlayer from the current branch.",
"update-version": "Update the version of the RxPlayer. Will update the codebase and perform every builds."
}
}
}