@vidispine/vdt-videojs 22.3.0 → 22.4.0-pre.1
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.
- package/dist/index.es.js +21 -18
- package/dist/index.js +21 -18
- package/dist/index.umd.js +21 -18
- package/package.json +23 -21
- package/rollup.config.js +12 -5
- package/src/menu.usage.stories.mdx +18 -0
- package/src/player.usage.stories.mdx +2 -2
package/dist/index.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import mousetrap from 'mousetrap';
|
|
|
3
3
|
import videojs from 'video.js/dist/alt/video.core.min';
|
|
4
4
|
|
|
5
5
|
var name = "@vidispine/vdt-videojs";
|
|
6
|
-
var version = "22.
|
|
6
|
+
var version = "22.4.0-pre.1";
|
|
7
7
|
var license = "SEE LICENSE IN LICENSE.md";
|
|
8
8
|
var publishConfig = {
|
|
9
9
|
access: "public"
|
|
@@ -19,10 +19,9 @@ var main = "dist/index.js";
|
|
|
19
19
|
var module = "dist/index.es.js";
|
|
20
20
|
var browser = "dist/index.umd.js";
|
|
21
21
|
var scripts = {
|
|
22
|
-
build: "
|
|
23
|
-
"build:watch": "
|
|
24
|
-
lint: "eslint
|
|
25
|
-
"lint:fix": "yarn lint --fix"
|
|
22
|
+
build: "rimraf dist && rollup -c",
|
|
23
|
+
"build:watch": "yarn build -w --environment DEVELOPMENT",
|
|
24
|
+
lint: "eslint . --ext js,md,mdx"
|
|
26
25
|
};
|
|
27
26
|
var dependencies = {
|
|
28
27
|
"@babel/runtime": "^7.18.9",
|
|
@@ -30,18 +29,22 @@ var dependencies = {
|
|
|
30
29
|
"video.js": "^7.20.2"
|
|
31
30
|
};
|
|
32
31
|
var devDependencies = {
|
|
33
|
-
"@babel/core": "
|
|
34
|
-
"@babel/plugin-transform-runtime": "
|
|
35
|
-
"@rollup/plugin-babel": "
|
|
36
|
-
"@rollup/plugin-commonjs": "
|
|
37
|
-
"@rollup/plugin-json": "
|
|
38
|
-
"@rollup/plugin-node-resolve": "
|
|
39
|
-
"@vidispine/eslint-config-base": "
|
|
40
|
-
"@vidispine/eslint-config-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
"@babel/core": "7.19.1",
|
|
33
|
+
"@babel/plugin-transform-runtime": "7.19.1",
|
|
34
|
+
"@rollup/plugin-babel": "5.3.1",
|
|
35
|
+
"@rollup/plugin-commonjs": "21.1.0",
|
|
36
|
+
"@rollup/plugin-json": "4.1.0",
|
|
37
|
+
"@rollup/plugin-node-resolve": "13.3.0",
|
|
38
|
+
"@vidispine/eslint-config-base": "workspace:*",
|
|
39
|
+
"@vidispine/eslint-config-mdx": "workspace:*",
|
|
40
|
+
"@vidispine/eslint-config-storybook": "workspace:*",
|
|
41
|
+
"@vidispine/prettier-config": "workspace:*",
|
|
42
|
+
eslint: "8.23.1",
|
|
43
|
+
prettier: "2.7.1",
|
|
44
|
+
rimraf: "3.0.2",
|
|
45
|
+
rollup: "2.79.0",
|
|
46
|
+
"rollup-plugin-cleanup": "3.2.1",
|
|
47
|
+
"rollup-plugin-sass": "1.2.13"
|
|
45
48
|
};
|
|
46
49
|
var browserslist = [
|
|
47
50
|
"since 2017-06"
|
|
@@ -49,6 +52,7 @@ var browserslist = [
|
|
|
49
52
|
var eslintConfig = {
|
|
50
53
|
"extends": [
|
|
51
54
|
"@vidispine/eslint-config-base",
|
|
55
|
+
"@vidispine/eslint-config-mdx",
|
|
52
56
|
"@vidispine/eslint-config-storybook"
|
|
53
57
|
]
|
|
54
58
|
};
|
|
@@ -57,7 +61,6 @@ var pkgInfo = {
|
|
|
57
61
|
name: name,
|
|
58
62
|
version: version,
|
|
59
63
|
license: license,
|
|
60
|
-
"private": false,
|
|
61
64
|
publishConfig: publishConfig,
|
|
62
65
|
description: description,
|
|
63
66
|
homepage: homepage,
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var mousetrap__default = /*#__PURE__*/_interopDefaultLegacy(mousetrap);
|
|
|
13
13
|
var videojs__default = /*#__PURE__*/_interopDefaultLegacy(videojs);
|
|
14
14
|
|
|
15
15
|
var name = "@vidispine/vdt-videojs";
|
|
16
|
-
var version = "22.
|
|
16
|
+
var version = "22.4.0-pre.1";
|
|
17
17
|
var license = "SEE LICENSE IN LICENSE.md";
|
|
18
18
|
var publishConfig = {
|
|
19
19
|
access: "public"
|
|
@@ -29,10 +29,9 @@ var main = "dist/index.js";
|
|
|
29
29
|
var module$1 = "dist/index.es.js";
|
|
30
30
|
var browser = "dist/index.umd.js";
|
|
31
31
|
var scripts = {
|
|
32
|
-
build: "
|
|
33
|
-
"build:watch": "
|
|
34
|
-
lint: "eslint
|
|
35
|
-
"lint:fix": "yarn lint --fix"
|
|
32
|
+
build: "rimraf dist && rollup -c",
|
|
33
|
+
"build:watch": "yarn build -w --environment DEVELOPMENT",
|
|
34
|
+
lint: "eslint . --ext js,md,mdx"
|
|
36
35
|
};
|
|
37
36
|
var dependencies = {
|
|
38
37
|
"@babel/runtime": "^7.18.9",
|
|
@@ -40,18 +39,22 @@ var dependencies = {
|
|
|
40
39
|
"video.js": "^7.20.2"
|
|
41
40
|
};
|
|
42
41
|
var devDependencies = {
|
|
43
|
-
"@babel/core": "
|
|
44
|
-
"@babel/plugin-transform-runtime": "
|
|
45
|
-
"@rollup/plugin-babel": "
|
|
46
|
-
"@rollup/plugin-commonjs": "
|
|
47
|
-
"@rollup/plugin-json": "
|
|
48
|
-
"@rollup/plugin-node-resolve": "
|
|
49
|
-
"@vidispine/eslint-config-base": "
|
|
50
|
-
"@vidispine/eslint-config-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
42
|
+
"@babel/core": "7.19.1",
|
|
43
|
+
"@babel/plugin-transform-runtime": "7.19.1",
|
|
44
|
+
"@rollup/plugin-babel": "5.3.1",
|
|
45
|
+
"@rollup/plugin-commonjs": "21.1.0",
|
|
46
|
+
"@rollup/plugin-json": "4.1.0",
|
|
47
|
+
"@rollup/plugin-node-resolve": "13.3.0",
|
|
48
|
+
"@vidispine/eslint-config-base": "workspace:*",
|
|
49
|
+
"@vidispine/eslint-config-mdx": "workspace:*",
|
|
50
|
+
"@vidispine/eslint-config-storybook": "workspace:*",
|
|
51
|
+
"@vidispine/prettier-config": "workspace:*",
|
|
52
|
+
eslint: "8.23.1",
|
|
53
|
+
prettier: "2.7.1",
|
|
54
|
+
rimraf: "3.0.2",
|
|
55
|
+
rollup: "2.79.0",
|
|
56
|
+
"rollup-plugin-cleanup": "3.2.1",
|
|
57
|
+
"rollup-plugin-sass": "1.2.13"
|
|
55
58
|
};
|
|
56
59
|
var browserslist = [
|
|
57
60
|
"since 2017-06"
|
|
@@ -59,6 +62,7 @@ var browserslist = [
|
|
|
59
62
|
var eslintConfig = {
|
|
60
63
|
"extends": [
|
|
61
64
|
"@vidispine/eslint-config-base",
|
|
65
|
+
"@vidispine/eslint-config-mdx",
|
|
62
66
|
"@vidispine/eslint-config-storybook"
|
|
63
67
|
]
|
|
64
68
|
};
|
|
@@ -67,7 +71,6 @@ var pkgInfo = {
|
|
|
67
71
|
name: name,
|
|
68
72
|
version: version,
|
|
69
73
|
license: license,
|
|
70
|
-
"private": false,
|
|
71
74
|
publishConfig: publishConfig,
|
|
72
75
|
description: description,
|
|
73
76
|
homepage: homepage,
|
package/dist/index.umd.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
var videojs__default = /*#__PURE__*/_interopDefaultLegacy(videojs);
|
|
12
12
|
|
|
13
13
|
var name = "@vidispine/vdt-videojs";
|
|
14
|
-
var version = "22.
|
|
14
|
+
var version = "22.4.0-pre.1";
|
|
15
15
|
var license = "SEE LICENSE IN LICENSE.md";
|
|
16
16
|
var publishConfig = {
|
|
17
17
|
access: "public"
|
|
@@ -27,10 +27,9 @@
|
|
|
27
27
|
var module = "dist/index.es.js";
|
|
28
28
|
var browser = "dist/index.umd.js";
|
|
29
29
|
var scripts = {
|
|
30
|
-
build: "
|
|
31
|
-
"build:watch": "
|
|
32
|
-
lint: "eslint
|
|
33
|
-
"lint:fix": "yarn lint --fix"
|
|
30
|
+
build: "rimraf dist && rollup -c",
|
|
31
|
+
"build:watch": "yarn build -w --environment DEVELOPMENT",
|
|
32
|
+
lint: "eslint . --ext js,md,mdx"
|
|
34
33
|
};
|
|
35
34
|
var dependencies = {
|
|
36
35
|
"@babel/runtime": "^7.18.9",
|
|
@@ -38,18 +37,22 @@
|
|
|
38
37
|
"video.js": "^7.20.2"
|
|
39
38
|
};
|
|
40
39
|
var devDependencies = {
|
|
41
|
-
"@babel/core": "
|
|
42
|
-
"@babel/plugin-transform-runtime": "
|
|
43
|
-
"@rollup/plugin-babel": "
|
|
44
|
-
"@rollup/plugin-commonjs": "
|
|
45
|
-
"@rollup/plugin-json": "
|
|
46
|
-
"@rollup/plugin-node-resolve": "
|
|
47
|
-
"@vidispine/eslint-config-base": "
|
|
48
|
-
"@vidispine/eslint-config-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
40
|
+
"@babel/core": "7.19.1",
|
|
41
|
+
"@babel/plugin-transform-runtime": "7.19.1",
|
|
42
|
+
"@rollup/plugin-babel": "5.3.1",
|
|
43
|
+
"@rollup/plugin-commonjs": "21.1.0",
|
|
44
|
+
"@rollup/plugin-json": "4.1.0",
|
|
45
|
+
"@rollup/plugin-node-resolve": "13.3.0",
|
|
46
|
+
"@vidispine/eslint-config-base": "workspace:*",
|
|
47
|
+
"@vidispine/eslint-config-mdx": "workspace:*",
|
|
48
|
+
"@vidispine/eslint-config-storybook": "workspace:*",
|
|
49
|
+
"@vidispine/prettier-config": "workspace:*",
|
|
50
|
+
eslint: "8.23.1",
|
|
51
|
+
prettier: "2.7.1",
|
|
52
|
+
rimraf: "3.0.2",
|
|
53
|
+
rollup: "2.79.0",
|
|
54
|
+
"rollup-plugin-cleanup": "3.2.1",
|
|
55
|
+
"rollup-plugin-sass": "1.2.13"
|
|
53
56
|
};
|
|
54
57
|
var browserslist = [
|
|
55
58
|
"since 2017-06"
|
|
@@ -57,6 +60,7 @@
|
|
|
57
60
|
var eslintConfig = {
|
|
58
61
|
"extends": [
|
|
59
62
|
"@vidispine/eslint-config-base",
|
|
63
|
+
"@vidispine/eslint-config-mdx",
|
|
60
64
|
"@vidispine/eslint-config-storybook"
|
|
61
65
|
]
|
|
62
66
|
};
|
|
@@ -65,7 +69,6 @@
|
|
|
65
69
|
name: name,
|
|
66
70
|
version: version,
|
|
67
71
|
license: license,
|
|
68
|
-
"private": false,
|
|
69
72
|
publishConfig: publishConfig,
|
|
70
73
|
description: description,
|
|
71
74
|
homepage: homepage,
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vidispine/vdt-videojs",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.4.0-pre.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
|
-
"private": false,
|
|
6
5
|
"publishConfig": {
|
|
7
6
|
"access": "public"
|
|
8
7
|
},
|
|
@@ -17,10 +16,9 @@
|
|
|
17
16
|
"module": "dist/index.es.js",
|
|
18
17
|
"browser": "dist/index.umd.js",
|
|
19
18
|
"scripts": {
|
|
20
|
-
"build": "
|
|
21
|
-
"build:watch": "
|
|
22
|
-
"lint": "eslint
|
|
23
|
-
"lint:fix": "yarn lint --fix"
|
|
19
|
+
"build": "rimraf dist && rollup -c",
|
|
20
|
+
"build:watch": "yarn build -w --environment DEVELOPMENT",
|
|
21
|
+
"lint": "eslint . --ext js,md,mdx"
|
|
24
22
|
},
|
|
25
23
|
"dependencies": {
|
|
26
24
|
"@babel/runtime": "^7.18.9",
|
|
@@ -28,18 +26,22 @@
|
|
|
28
26
|
"video.js": "^7.20.2"
|
|
29
27
|
},
|
|
30
28
|
"devDependencies": {
|
|
31
|
-
"@babel/core": "
|
|
32
|
-
"@babel/plugin-transform-runtime": "
|
|
33
|
-
"@rollup/plugin-babel": "
|
|
34
|
-
"@rollup/plugin-commonjs": "
|
|
35
|
-
"@rollup/plugin-json": "
|
|
36
|
-
"@rollup/plugin-node-resolve": "
|
|
37
|
-
"@vidispine/eslint-config-base": "22.
|
|
38
|
-
"@vidispine/eslint-config-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
29
|
+
"@babel/core": "7.19.1",
|
|
30
|
+
"@babel/plugin-transform-runtime": "7.19.1",
|
|
31
|
+
"@rollup/plugin-babel": "5.3.1",
|
|
32
|
+
"@rollup/plugin-commonjs": "21.1.0",
|
|
33
|
+
"@rollup/plugin-json": "4.1.0",
|
|
34
|
+
"@rollup/plugin-node-resolve": "13.3.0",
|
|
35
|
+
"@vidispine/eslint-config-base": "22.4.0-pre.1",
|
|
36
|
+
"@vidispine/eslint-config-mdx": "22.4.0-pre.1",
|
|
37
|
+
"@vidispine/eslint-config-storybook": "22.4.0-pre.1",
|
|
38
|
+
"@vidispine/prettier-config": "22.4.0-pre.1",
|
|
39
|
+
"eslint": "8.23.1",
|
|
40
|
+
"prettier": "2.7.1",
|
|
41
|
+
"rimraf": "3.0.2",
|
|
42
|
+
"rollup": "2.79.0",
|
|
43
|
+
"rollup-plugin-cleanup": "3.2.1",
|
|
44
|
+
"rollup-plugin-sass": "1.2.13"
|
|
43
45
|
},
|
|
44
46
|
"browserslist": [
|
|
45
47
|
"since 2017-06"
|
|
@@ -47,9 +49,9 @@
|
|
|
47
49
|
"eslintConfig": {
|
|
48
50
|
"extends": [
|
|
49
51
|
"@vidispine/eslint-config-base",
|
|
52
|
+
"@vidispine/eslint-config-mdx",
|
|
50
53
|
"@vidispine/eslint-config-storybook"
|
|
51
54
|
]
|
|
52
55
|
},
|
|
53
|
-
"prettier": "@vidispine/prettier-config"
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
+
"prettier": "@vidispine/prettier-config"
|
|
57
|
+
}
|
package/rollup.config.js
CHANGED
|
@@ -3,7 +3,6 @@ import commonjs from '@rollup/plugin-commonjs';
|
|
|
3
3
|
import json from '@rollup/plugin-json';
|
|
4
4
|
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
5
5
|
import cleanup from 'rollup-plugin-cleanup';
|
|
6
|
-
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
|
|
7
6
|
import sass from 'rollup-plugin-sass';
|
|
8
7
|
|
|
9
8
|
import pkg from './package.json';
|
|
@@ -11,9 +10,6 @@ import pkg from './package.json';
|
|
|
11
10
|
const isDevelopment = !!process.env.DEVELOPMENT;
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
|
-
external: Object.keys(pkg.dependencies || {}).map(
|
|
15
|
-
(packageName) => new RegExp(`^${packageName}(/.*)?`),
|
|
16
|
-
),
|
|
17
13
|
input: 'src/index.js',
|
|
18
14
|
output: [
|
|
19
15
|
{
|
|
@@ -38,12 +34,23 @@ export default {
|
|
|
38
34
|
},
|
|
39
35
|
},
|
|
40
36
|
],
|
|
37
|
+
external: Object.keys({
|
|
38
|
+
...pkg.dependencies,
|
|
39
|
+
...pkg.peerDependencies,
|
|
40
|
+
...pkg.optionalDependencies,
|
|
41
|
+
}).map((packageName) => new RegExp(`^${packageName}(/.*)?`)),
|
|
41
42
|
plugins: [
|
|
42
43
|
json(),
|
|
43
44
|
sass({
|
|
44
45
|
output: 'dist/index.css',
|
|
46
|
+
options: {
|
|
47
|
+
importer(path) {
|
|
48
|
+
/* Fix so relative import in '~video.js/src/css/video-js.scss'
|
|
49
|
+
* looks at yarn workspace hoisted location */
|
|
50
|
+
return { file: path.startsWith('node_modules/') ? `../../${path}` : path };
|
|
51
|
+
},
|
|
52
|
+
},
|
|
45
53
|
}),
|
|
46
|
-
peerDepsExternal(),
|
|
47
54
|
nodeResolve(),
|
|
48
55
|
commonjs(),
|
|
49
56
|
babel({
|
|
@@ -15,6 +15,19 @@ import { Meta } from '@storybook/addon-docs';
|
|
|
15
15
|
It's possible to pass your own menu items to a new Player instance during initialization like so:
|
|
16
16
|
|
|
17
17
|
```js
|
|
18
|
+
import { Player } from '@vidispine/vdt-videojs';
|
|
19
|
+
|
|
20
|
+
const target = {
|
|
21
|
+
/* ... */
|
|
22
|
+
};
|
|
23
|
+
const testData = {
|
|
24
|
+
/* ... */
|
|
25
|
+
};
|
|
26
|
+
const menuItems = {
|
|
27
|
+
/* ... */
|
|
28
|
+
};
|
|
29
|
+
const randIndex = 0; // random index
|
|
30
|
+
|
|
18
31
|
const player = new Player({
|
|
19
32
|
target,
|
|
20
33
|
sources: testData[randIndex].sources,
|
|
@@ -26,6 +39,11 @@ const player = new Player({
|
|
|
26
39
|
The items can be defined as follows:
|
|
27
40
|
|
|
28
41
|
```js
|
|
42
|
+
import { Player } from '@vidispine/vdt-videojs';
|
|
43
|
+
|
|
44
|
+
const player = new Player({
|
|
45
|
+
/* ... */
|
|
46
|
+
});
|
|
29
47
|
const menuItems = [
|
|
30
48
|
{
|
|
31
49
|
title: 'Example 1',
|
|
@@ -12,11 +12,11 @@ import { Meta } from '@storybook/addon-docs';
|
|
|
12
12
|
|
|
13
13
|
## Example Usage
|
|
14
14
|
|
|
15
|
-
`import { Player } from '@vidispine/vdt-videojs'`
|
|
16
|
-
|
|
17
15
|
Here's an example how to use the Player class in a pure js way in your project:
|
|
18
16
|
|
|
19
17
|
```js
|
|
18
|
+
import { Player } from '@vidispine/vdt-videojs';
|
|
19
|
+
|
|
20
20
|
const playerReference = new Player({
|
|
21
21
|
target: document.getElementById('player-node'), // HTML mount point
|
|
22
22
|
|