@burh/nuxt-core 1.0.387 → 1.0.389
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.
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<video
|
|
3
|
+
frameborder="0"
|
|
4
|
+
controls
|
|
5
|
+
ref="muxVideo"
|
|
6
|
+
/>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import Hls from 'hls.js';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: 'mux-video',
|
|
14
|
+
props: {
|
|
15
|
+
src: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
methods: {
|
|
21
|
+
getMuxVideo() {
|
|
22
|
+
const video = this.$refs.muxVideo;
|
|
23
|
+
|
|
24
|
+
if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
|
25
|
+
video.src = this.src;
|
|
26
|
+
} else if (Hls.isSupported()) {
|
|
27
|
+
const hls = new Hls();
|
|
28
|
+
hls.loadSource(this.src);
|
|
29
|
+
hls.attachMedia(video);
|
|
30
|
+
} else {
|
|
31
|
+
console.error('Esse navegador não suporta o tipo de vídeo');
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
mounted() {
|
|
36
|
+
this.getMuxVideo();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burh/nuxt-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.389",
|
|
4
4
|
"description": "Design System and Components.",
|
|
5
5
|
"author": "Burh",
|
|
6
6
|
"scripts": {
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"fuse.js": "^3.4.5",
|
|
46
46
|
"google-maps": "^3.3.0",
|
|
47
47
|
"heic2any": "0.0.2",
|
|
48
|
+
"hls.js": "^1.0.10",
|
|
48
49
|
"local-web-server": "^3.0.7",
|
|
49
50
|
"mobile-device-detect": "^0.3.3",
|
|
50
51
|
"moment": "^2.24.0",
|