@enso-ui/how-to 5.2.2 → 5.2.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enso-ui/how-to",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.4",
|
|
4
4
|
"description": "Basic how-to package",
|
|
5
5
|
"main": "src/bulma/pages/howTo/Index.vue",
|
|
6
6
|
"repository": {
|
|
@@ -18,12 +18,6 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://github.com/enso-ui/how-to#readme",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@enso-ui/card": "^4.0.0",
|
|
22
|
-
"@enso-ui/confirmation": "^3.1.0",
|
|
23
|
-
"@enso-ui/directives": "^3.1.0",
|
|
24
|
-
"@enso-ui/transitions": "^2.1.0",
|
|
25
|
-
"@enso-ui/ui": "^7.1.0",
|
|
26
|
-
"@enso-ui/uploader": "^3.1.0",
|
|
27
21
|
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
28
22
|
"@fortawesome/free-regular-svg-icons": "^7.2.0",
|
|
29
23
|
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
@@ -32,9 +26,21 @@
|
|
|
32
26
|
"video.js": "^7.0"
|
|
33
27
|
},
|
|
34
28
|
"peerDependencies": {
|
|
29
|
+
"@enso-ui/card": "^4.0.0",
|
|
30
|
+
"@enso-ui/confirmation": "^3.1.0",
|
|
31
|
+
"@enso-ui/directives": "^3.1.0",
|
|
32
|
+
"@enso-ui/transitions": "^2.1.0",
|
|
33
|
+
"@enso-ui/ui": "^7.1.0",
|
|
34
|
+
"@enso-ui/uploader": "^3.1.0",
|
|
35
35
|
"vue": "^3.5.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
+
"@enso-ui/card": "^4.0.0",
|
|
39
|
+
"@enso-ui/confirmation": "^3.1.0",
|
|
40
|
+
"@enso-ui/directives": "^3.1.0",
|
|
41
|
+
"@enso-ui/transitions": "^2.1.0",
|
|
42
|
+
"@enso-ui/ui": "^7.1.0",
|
|
43
|
+
"@enso-ui/uploader": "^3.1.0",
|
|
38
44
|
"vue": "^3.5.0"
|
|
39
45
|
}
|
|
40
46
|
}
|
|
@@ -105,9 +105,10 @@ import {
|
|
|
105
105
|
} from '@enso-ui/card/bulma';
|
|
106
106
|
import Confirmation from '@enso-ui/confirmation/bulma';
|
|
107
107
|
import { EnsoUploader } from '@enso-ui/uploader';
|
|
108
|
-
import VideoPlayer from './VideoPlayer.vue';
|
|
109
108
|
import 'video.js/dist/video-js.css';
|
|
110
109
|
|
|
110
|
+
const VideoPlayer = () => import('./VideoPlayer.vue');
|
|
111
|
+
|
|
111
112
|
export default {
|
|
112
113
|
name: 'HowToVideo',
|
|
113
114
|
|
|
@@ -13,11 +13,6 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<script>
|
|
16
|
-
// lib
|
|
17
|
-
import _videojs from 'video.js';
|
|
18
|
-
|
|
19
|
-
const videojs = window.videojs || _videojs;
|
|
20
|
-
|
|
21
16
|
// as of videojs 6.6.0
|
|
22
17
|
const DEFAULT_EVENTS = [
|
|
23
18
|
'loadeddata',
|
|
@@ -31,6 +26,17 @@ const DEFAULT_EVENTS = [
|
|
|
31
26
|
'error',
|
|
32
27
|
];
|
|
33
28
|
|
|
29
|
+
let videojsPromise;
|
|
30
|
+
|
|
31
|
+
const getVideojs = async () => {
|
|
32
|
+
if (!videojsPromise) {
|
|
33
|
+
videojsPromise = import('video.js')
|
|
34
|
+
.then(({ default: videojs }) => window.videojs || videojs);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return videojsPromise;
|
|
38
|
+
};
|
|
39
|
+
|
|
34
40
|
// export
|
|
35
41
|
export default {
|
|
36
42
|
name: 'VideoPlayer',
|
|
@@ -127,7 +133,8 @@ export default {
|
|
|
127
133
|
},
|
|
128
134
|
|
|
129
135
|
methods: {
|
|
130
|
-
initialize() {
|
|
136
|
+
async initialize() {
|
|
137
|
+
const videojs = await getVideojs();
|
|
131
138
|
// videojs options
|
|
132
139
|
const videoOptions = { ...this.globalOptions, ...this.options };
|
|
133
140
|
|