@vidispine/vdt-videojs 22.2.0-pre.1 → 22.2.0-pre.2
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 +16 -4
- package/dist/index.js +16 -4
- package/dist/index.umd.js +16 -4
- package/package.json +13 -4
- package/src/index.stories.mdx +3 -4
- package/src/player.usage.stories.mdx +38 -37
package/dist/index.es.js
CHANGED
|
@@ -3,12 +3,21 @@ 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.2.0-pre.
|
|
6
|
+
var version = "22.2.0-pre.2";
|
|
7
7
|
var license = "SEE LICENSE IN LICENSE.md";
|
|
8
|
+
var publishConfig = {
|
|
9
|
+
access: "public"
|
|
10
|
+
};
|
|
11
|
+
var description = "Javascript player based on videojs";
|
|
12
|
+
var homepage = "https://vidispine.github.io/vdt/?path=/docs/vdt-videojs";
|
|
13
|
+
var repository = {
|
|
14
|
+
type: "git",
|
|
15
|
+
url: "https://github.com/vidispine/vdt.git",
|
|
16
|
+
directory: "packages/vdt-videojs"
|
|
17
|
+
};
|
|
8
18
|
var main = "dist/index.js";
|
|
9
19
|
var module = "dist/index.es.js";
|
|
10
20
|
var browser = "dist/index.umd.js";
|
|
11
|
-
var author = "Oto Inša <otoinsa@bertelsmann.de>";
|
|
12
21
|
var scripts = {
|
|
13
22
|
build: "rm -rf dist/ && rollup -c",
|
|
14
23
|
"build:watch": "rm -rf dist/*.js* && rollup -c -w --environment DEVELOPMENT",
|
|
@@ -27,7 +36,7 @@ var devDependencies = {
|
|
|
27
36
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
28
37
|
"@rollup/plugin-json": "^4.1.0",
|
|
29
38
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
30
|
-
"@vidispine/eslint-config-base": "^22.2.0-pre.
|
|
39
|
+
"@vidispine/eslint-config-base": "^22.2.0-pre.2",
|
|
31
40
|
"@vidispine/eslint-config-storybook": "*",
|
|
32
41
|
rollup: "^2.67.0",
|
|
33
42
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
@@ -49,10 +58,13 @@ var pkgInfo = {
|
|
|
49
58
|
version: version,
|
|
50
59
|
license: license,
|
|
51
60
|
"private": false,
|
|
61
|
+
publishConfig: publishConfig,
|
|
62
|
+
description: description,
|
|
63
|
+
homepage: homepage,
|
|
64
|
+
repository: repository,
|
|
52
65
|
main: main,
|
|
53
66
|
module: module,
|
|
54
67
|
browser: browser,
|
|
55
|
-
author: author,
|
|
56
68
|
scripts: scripts,
|
|
57
69
|
dependencies: dependencies,
|
|
58
70
|
devDependencies: devDependencies,
|
package/dist/index.js
CHANGED
|
@@ -13,12 +13,21 @@ 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.2.0-pre.
|
|
16
|
+
var version = "22.2.0-pre.2";
|
|
17
17
|
var license = "SEE LICENSE IN LICENSE.md";
|
|
18
|
+
var publishConfig = {
|
|
19
|
+
access: "public"
|
|
20
|
+
};
|
|
21
|
+
var description = "Javascript player based on videojs";
|
|
22
|
+
var homepage = "https://vidispine.github.io/vdt/?path=/docs/vdt-videojs";
|
|
23
|
+
var repository = {
|
|
24
|
+
type: "git",
|
|
25
|
+
url: "https://github.com/vidispine/vdt.git",
|
|
26
|
+
directory: "packages/vdt-videojs"
|
|
27
|
+
};
|
|
18
28
|
var main = "dist/index.js";
|
|
19
29
|
var module$1 = "dist/index.es.js";
|
|
20
30
|
var browser = "dist/index.umd.js";
|
|
21
|
-
var author = "Oto Inša <otoinsa@bertelsmann.de>";
|
|
22
31
|
var scripts = {
|
|
23
32
|
build: "rm -rf dist/ && rollup -c",
|
|
24
33
|
"build:watch": "rm -rf dist/*.js* && rollup -c -w --environment DEVELOPMENT",
|
|
@@ -37,7 +46,7 @@ var devDependencies = {
|
|
|
37
46
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
38
47
|
"@rollup/plugin-json": "^4.1.0",
|
|
39
48
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
40
|
-
"@vidispine/eslint-config-base": "^22.2.0-pre.
|
|
49
|
+
"@vidispine/eslint-config-base": "^22.2.0-pre.2",
|
|
41
50
|
"@vidispine/eslint-config-storybook": "*",
|
|
42
51
|
rollup: "^2.67.0",
|
|
43
52
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
@@ -59,10 +68,13 @@ var pkgInfo = {
|
|
|
59
68
|
version: version,
|
|
60
69
|
license: license,
|
|
61
70
|
"private": false,
|
|
71
|
+
publishConfig: publishConfig,
|
|
72
|
+
description: description,
|
|
73
|
+
homepage: homepage,
|
|
74
|
+
repository: repository,
|
|
62
75
|
main: main,
|
|
63
76
|
module: module$1,
|
|
64
77
|
browser: browser,
|
|
65
|
-
author: author,
|
|
66
78
|
scripts: scripts,
|
|
67
79
|
dependencies: dependencies,
|
|
68
80
|
devDependencies: devDependencies,
|
package/dist/index.umd.js
CHANGED
|
@@ -11,12 +11,21 @@
|
|
|
11
11
|
var videojs__default = /*#__PURE__*/_interopDefaultLegacy(videojs);
|
|
12
12
|
|
|
13
13
|
var name = "@vidispine/vdt-videojs";
|
|
14
|
-
var version = "22.2.0-pre.
|
|
14
|
+
var version = "22.2.0-pre.2";
|
|
15
15
|
var license = "SEE LICENSE IN LICENSE.md";
|
|
16
|
+
var publishConfig = {
|
|
17
|
+
access: "public"
|
|
18
|
+
};
|
|
19
|
+
var description = "Javascript player based on videojs";
|
|
20
|
+
var homepage = "https://vidispine.github.io/vdt/?path=/docs/vdt-videojs";
|
|
21
|
+
var repository = {
|
|
22
|
+
type: "git",
|
|
23
|
+
url: "https://github.com/vidispine/vdt.git",
|
|
24
|
+
directory: "packages/vdt-videojs"
|
|
25
|
+
};
|
|
16
26
|
var main = "dist/index.js";
|
|
17
27
|
var module = "dist/index.es.js";
|
|
18
28
|
var browser = "dist/index.umd.js";
|
|
19
|
-
var author = "Oto Inša <otoinsa@bertelsmann.de>";
|
|
20
29
|
var scripts = {
|
|
21
30
|
build: "rm -rf dist/ && rollup -c",
|
|
22
31
|
"build:watch": "rm -rf dist/*.js* && rollup -c -w --environment DEVELOPMENT",
|
|
@@ -35,7 +44,7 @@
|
|
|
35
44
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
36
45
|
"@rollup/plugin-json": "^4.1.0",
|
|
37
46
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
38
|
-
"@vidispine/eslint-config-base": "^22.2.0-pre.
|
|
47
|
+
"@vidispine/eslint-config-base": "^22.2.0-pre.2",
|
|
39
48
|
"@vidispine/eslint-config-storybook": "*",
|
|
40
49
|
rollup: "^2.67.0",
|
|
41
50
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
@@ -57,10 +66,13 @@
|
|
|
57
66
|
version: version,
|
|
58
67
|
license: license,
|
|
59
68
|
"private": false,
|
|
69
|
+
publishConfig: publishConfig,
|
|
70
|
+
description: description,
|
|
71
|
+
homepage: homepage,
|
|
72
|
+
repository: repository,
|
|
60
73
|
main: main,
|
|
61
74
|
module: module,
|
|
62
75
|
browser: browser,
|
|
63
|
-
author: author,
|
|
64
76
|
scripts: scripts,
|
|
65
77
|
dependencies: dependencies,
|
|
66
78
|
devDependencies: devDependencies,
|
package/package.json
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vidispine/vdt-videojs",
|
|
3
|
-
"version": "22.2.0-pre.
|
|
3
|
+
"version": "22.2.0-pre.2",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"private": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"description": "Javascript player based on videojs",
|
|
10
|
+
"homepage": "https://vidispine.github.io/vdt/?path=/docs/vdt-videojs",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/vidispine/vdt.git",
|
|
14
|
+
"directory": "packages/vdt-videojs"
|
|
15
|
+
},
|
|
6
16
|
"main": "dist/index.js",
|
|
7
17
|
"module": "dist/index.es.js",
|
|
8
18
|
"browser": "dist/index.umd.js",
|
|
9
|
-
"author": "Oto Inša <otoinsa@bertelsmann.de>",
|
|
10
19
|
"scripts": {
|
|
11
20
|
"build": "rm -rf dist/ && rollup -c",
|
|
12
21
|
"build:watch": "rm -rf dist/*.js* && rollup -c -w --environment DEVELOPMENT",
|
|
@@ -25,7 +34,7 @@
|
|
|
25
34
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
26
35
|
"@rollup/plugin-json": "^4.1.0",
|
|
27
36
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
28
|
-
"@vidispine/eslint-config-base": "^22.2.0-pre.
|
|
37
|
+
"@vidispine/eslint-config-base": "^22.2.0-pre.2",
|
|
29
38
|
"@vidispine/eslint-config-storybook": "*",
|
|
30
39
|
"rollup": "^2.67.0",
|
|
31
40
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
@@ -42,5 +51,5 @@
|
|
|
42
51
|
]
|
|
43
52
|
},
|
|
44
53
|
"prettier": "@vidispine/prettier-config",
|
|
45
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "c7b5349500b1f354c9bd3ce40ac32a382c74ae51"
|
|
46
55
|
}
|
package/src/index.stories.mdx
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Meta
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
|
2
2
|
|
|
3
3
|
import pkgJson from '../package.json';
|
|
4
|
-
import playerReadme from '../README.md';
|
|
5
4
|
|
|
6
5
|
<Meta
|
|
7
|
-
title="vdt-videojs/
|
|
6
|
+
title="vdt-videojs/Overview"
|
|
8
7
|
parameters={{
|
|
9
8
|
viewMode: 'docs',
|
|
10
9
|
previewTabs: {
|
|
@@ -26,7 +25,7 @@ export const changelogMd = () => {
|
|
|
26
25
|
return mdChangeLog;
|
|
27
26
|
};
|
|
28
27
|
|
|
29
|
-
#
|
|
28
|
+
# Overview
|
|
30
29
|
|
|
31
30
|
```
|
|
32
31
|
┌───────────┐ ┌───────┐
|
|
@@ -16,52 +16,53 @@ import { Meta } from '@storybook/addon-docs';
|
|
|
16
16
|
|
|
17
17
|
Here's an example how to use the Player class in a pure js way in your project:
|
|
18
18
|
|
|
19
|
-
```
|
|
19
|
+
```js
|
|
20
20
|
const playerReference = new Player({
|
|
21
|
-
|
|
21
|
+
target: document.getElementById('player-node'), // HTML mount point
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
sources: [
|
|
24
|
+
{ src: 'https://some.domain/video-file.mp4', type: 'video/mp4' },
|
|
25
|
+
{ src: 'https://some.domain/video-file.webm', type: 'video/webm' },
|
|
26
|
+
],
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
posterUrl: 'https://some.domain/poster-image.jpg', // optional
|
|
29
|
+
color: '#e84393', // optional - replaces primary color
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
31
|
+
subtitles: [
|
|
32
|
+
// optional
|
|
33
|
+
{
|
|
34
|
+
src: 'https://some.domain/video-subtitles.vvt',
|
|
35
|
+
lang: 'en',
|
|
36
|
+
label: 'English',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
src: 'https://some.domain/video-subtitles-es.vvt',
|
|
40
|
+
lang: 'es',
|
|
41
|
+
label: 'Spanish',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
// or use the Blob constructor with file string contents
|
|
45
|
+
src: new Blob(['WEBVTT\n\n\n00:00:00.500(...)'], 'text/plain'),
|
|
46
|
+
lang: 'dk',
|
|
47
|
+
label: 'Danish',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
timecode: false, // optional - replaces time display with SMPTE timecode
|
|
52
|
+
frameRate: 24000 / 1001, // optional - use together with timecode option
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
onReady: () => {
|
|
55
|
+
// optional
|
|
56
|
+
// invoke methods after player has done initializing
|
|
57
|
+
},
|
|
56
58
|
|
|
57
|
-
|
|
59
|
+
/*
|
|
58
60
|
optional - will add a screenshot button to player
|
|
59
61
|
control bar and invoke method callback on click with player's
|
|
60
62
|
current time in seconds as an argument (from start)
|
|
61
63
|
*/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
})
|
|
66
|
-
|
|
64
|
+
onScreenshot: (currentTime) => {
|
|
65
|
+
console.log(currentTime); // -> 0.1280 (current position in s)
|
|
66
|
+
},
|
|
67
|
+
});
|
|
67
68
|
```
|