@antmedia/web_player 2.8.0-SNAPSHOT

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/.project +17 -0
  2. package/.settings/.jsdtscope +7 -0
  3. package/.settings/org.eclipse.wst.jsdt.ui.superType.container +1 -0
  4. package/.settings/org.eclipse.wst.jsdt.ui.superType.name +1 -0
  5. package/LICENSE +201 -0
  6. package/README.md +1 -0
  7. package/api-extractor.json +38 -0
  8. package/codecov.yml +6 -0
  9. package/dist/_commonjsHelpers-ed042b00.js +10 -0
  10. package/dist/aframe-master-42bb78a9.js +7139 -0
  11. package/dist/browser/web_player.js +976 -0
  12. package/dist/dash.all.min-84806d51.js +36 -0
  13. package/dist/es/_commonjsHelpers-7d1333e8.js +7 -0
  14. package/dist/es/aframe-master-a6146619.js +7137 -0
  15. package/dist/es/dash.all.min-4a2772b6.js +34 -0
  16. package/dist/es/index.d.ts +227 -0
  17. package/dist/es/index.js +1 -0
  18. package/dist/es/video-js.min-8b4dfe88.js +3 -0
  19. package/dist/es/video.es-22056625.js +31061 -0
  20. package/dist/es/videojs-contrib-quality-levels.es-5f5b5f23.js +287 -0
  21. package/dist/es/videojs-hls-quality-selector.es-3c54e1cd.js +391 -0
  22. package/dist/es/videojs-webrtc-plugin-b9e4da27.js +3 -0
  23. package/dist/es/videojs-webrtc-plugin.es-f41400f7.js +7649 -0
  24. package/dist/es/web_player.js +1262 -0
  25. package/dist/index.d.ts +227 -0
  26. package/dist/index.js +7 -0
  27. package/dist/video-js.min-7e4ae47a.js +5 -0
  28. package/dist/video.es-72122d04.js +31067 -0
  29. package/dist/videojs-contrib-quality-levels.es-ef3cec9e.js +289 -0
  30. package/dist/videojs-hls-quality-selector.es-562309df.js +393 -0
  31. package/dist/videojs-webrtc-plugin-d30c3e7a.js +5 -0
  32. package/dist/videojs-webrtc-plugin.es-ac81d249.js +7651 -0
  33. package/dist/web_player.js +1265 -0
  34. package/karma.conf.cjs +74 -0
  35. package/package.json +68 -0
  36. package/rollup.config.browser.cjs +16 -0
  37. package/rollup.config.module.cjs +42 -0
  38. package/src/index.js +1 -0
  39. package/src/web_player.js +1133 -0
  40. package/test/embedded-player.test.js +864 -0
  41. package/tsconfig.json +24 -0
package/karma.conf.cjs ADDED
@@ -0,0 +1,74 @@
1
+ module.exports = function(config) {
2
+ config.set({
3
+ frameworks: ['mocha', 'chai', 'sinon'],
4
+ files: [
5
+ { pattern: "test/*.js", type: "module" },
6
+ { pattern: "dist/es/*.js", included: false },
7
+
8
+ ],
9
+
10
+ reporters: ['progress', 'coverage'],
11
+
12
+ preprocessors: {
13
+ 'dist/es/web_player.js': ['coverage'],
14
+ },
15
+
16
+ coverageReporter: {
17
+ reporters: [
18
+ {type: 'lcov', dir:'coverage/lcov'},
19
+ {type: 'text'},
20
+ {type: 'html', dir:'coverage/html'}
21
+ ],
22
+
23
+ },
24
+
25
+ port: 9876, // karma web server port
26
+
27
+ colors: true,
28
+
29
+ logLevel: config.LOG_INFO,
30
+
31
+ browsers: ['CustomChrome', "ChromeMobileUserAgent"],
32
+ //browsers: ['Chrome'],
33
+
34
+
35
+ customLaunchers: {
36
+ CustomChrome: {
37
+ base: 'Chrome',
38
+ flags: [
39
+ '--disable-gpu',
40
+ "--headless=new",
41
+ "--no-sandbox",
42
+ "--disable-dev-shm-usage",
43
+ "--log-level=1",
44
+ "--remote-allow-origins=*",
45
+ "--use-fake-ui-for-media-stream",
46
+ "--use-fake-device-for-media-stream",
47
+ ]
48
+ },
49
+
50
+ ChromeMobileUserAgent: {
51
+ base: 'Chrome',
52
+ flags: [
53
+ '--disable-gpu',
54
+ "--headless=new",
55
+ "--no-sandbox",
56
+ "--disable-dev-shm-usage",
57
+ "--log-level=1",
58
+ "--remote-allow-origins=*",
59
+ "--use-fake-ui-for-media-stream",
60
+ "--use-fake-device-for-media-stream",
61
+ '--user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1"'
62
+ ]
63
+ },
64
+
65
+ },
66
+
67
+ autoWatch: true,
68
+
69
+ singleRun: true, // Karma captures browsers, runs the tests and exits
70
+ //singleRun: false,
71
+
72
+ concurrency: Infinity,
73
+ })
74
+ }
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@antmedia/web_player",
3
+ "version": "2.8.0-SNAPSHOT",
4
+ "description": "Ant Media Server Player that can play WebRTC, HLS, DASH",
5
+ "main": "dist/index.js",
6
+ "module": "dist/es/index.js",
7
+ "type": "module",
8
+ "scripts": {
9
+ "compile": "npm run cleanup:tsbuild && npm run compile:js && npm run compile:ts && copy-files-from-to && npm run cleanup:tsbuild",
10
+ "compile:js": "rollup -c rollup.config.module.cjs && rollup -c rollup.config.browser.cjs ",
11
+ "compile:ts": "tsc -p ./tsconfig.json && api-extractor run",
12
+ "cleanup:tsbuild": "rimraf ./tsbuild",
13
+ "test": "karma start karma.conf.cjs",
14
+ "codecov": "codecov"
15
+ },
16
+ "copyFiles": [
17
+ {
18
+ "from": "./dist/es/index.d.ts",
19
+ "to": "./dist/index.d.ts"
20
+ }
21
+ ],
22
+ "author": "Ant Media",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/ant-media/StreamApp.git"
26
+ },
27
+ "publishConfig": {
28
+ "registry": "https://registry.npmjs.org/"
29
+ },
30
+ "license": "ISC",
31
+ "dependencies": {
32
+ "@antmedia/videojs-webrtc-plugin": "^1.2.1",
33
+ "@antmedia/webrtc_adaptor": "2.8.0-SNAPSHOT",
34
+ "aframe": "1.2.0",
35
+ "dashjs": "^4.5.2",
36
+ "rimraf": "^5.0.5",
37
+ "video.js": "^7.18.0",
38
+ "videojs-contrib-quality-levels": "^2.2.1",
39
+ "videojs-hls-quality-selector": "^1.1.4"
40
+ },
41
+ "devDependencies": {
42
+ "@babel/core": "^7.21.5",
43
+ "@babel/preset-env": "^7.21.5",
44
+ "@microsoft/api-extractor": "^7.36.1",
45
+ "@rollup/plugin-babel": "^6.0.3",
46
+ "@rollup/plugin-commonjs": "^25.0.7",
47
+ "@rollup/plugin-node-resolve": "^15.2.3",
48
+ "@rollup/plugin-terser": "^0.4.4",
49
+ "chai": "^4.3.7",
50
+ "codecov": "^3.8.3",
51
+ "copy-files-from-to": "^3.9.0",
52
+ "eslint": "^8.9.0",
53
+ "jsdoc": "^3.6.10",
54
+ "karma": "^6.4.2",
55
+ "karma-chai": "^0.1.0",
56
+ "karma-chrome-launcher": "^3.2.0",
57
+ "karma-coverage": "^2.2.0",
58
+ "karma-mocha": "^2.0.1",
59
+ "karma-sinon": "^1.0.5",
60
+ "mocha": "^10.2.0",
61
+ "rimraf": "^3.0.2",
62
+ "rollup": "^3.21.2",
63
+ "rollup-plugin-import-css": "^3.4.0",
64
+ "rollup-plugin-replace": "^2.2.0",
65
+ "sinon": "^15.0.4",
66
+ "typescript": "^5.1.3"
67
+ }
68
+ }
@@ -0,0 +1,16 @@
1
+
2
+ const babel = require('@rollup/plugin-babel').default;
3
+
4
+ const builds = {
5
+ input: [ 'src/index.js'],
6
+ output: [{
7
+ name: 'web_player',
8
+ file: 'dist/browser/web_player.js',
9
+ format: 'umd'
10
+ },
11
+ ],
12
+ plugins: [babel({ babelHelpers: 'bundled' })]
13
+
14
+ };
15
+
16
+ module.exports = builds
@@ -0,0 +1,42 @@
1
+
2
+ const babel = require('@rollup/plugin-babel').default;
3
+ const nodeResolve = require('@rollup/plugin-node-resolve').default;
4
+ const commonjs = require('@rollup/plugin-commonjs').default;
5
+ const css = require("rollup-plugin-import-css");
6
+ const replace = require('rollup-plugin-replace');
7
+ const terser = require('@rollup/plugin-terser');
8
+
9
+ const builds = {
10
+ input: [
11
+ 'src/index.js',
12
+ 'src/web_player.js'
13
+ ],
14
+ output: [{
15
+ dir: 'dist',
16
+ format: 'cjs'
17
+ },
18
+ {
19
+ dir: 'dist/es',
20
+ format: 'es'
21
+ }
22
+ ],
23
+ plugins: [
24
+ babel({ babelHelpers: 'bundled' }),
25
+ nodeResolve(),
26
+ commonjs(),
27
+ css(),
28
+ replace({
29
+ ENV: JSON.stringify(process.env.NODE_ENV || 'development'),
30
+ }),
31
+ process.env.NODE_ENV === 'production' && terser(),
32
+ /*terser({
33
+ compress: {
34
+ unused: true
35
+ }
36
+ })
37
+ */
38
+ ]
39
+
40
+ };
41
+
42
+ module.exports = builds
package/src/index.js ADDED
@@ -0,0 +1 @@
1
+ export { WebPlayer } from "./web_player.js";