Skip to content

Commit f9cdfa3

Browse files
committed
修复视频流报错问题
1 parent b1d4f5a commit f9cdfa3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/video-play/main.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
* @Author: web.王晓冬
33
* @Date: 2020-11-03 16:29:47
4-
* @LastEditors: web.王晓冬
5-
* @LastEditTime: 2021-09-01 12:03:22
4+
* @LastEditors: iTab.link
5+
* @LastEditTime: 2021-11-22 17:06:18
66
* @Description: file content
77
*/
88

@@ -259,6 +259,7 @@ import {
259259
isMobile,
260260
firstUpperCase,
261261
} from "../utils/util";
262+
const Hls = new Hls2({ fragLoadingTimeOut: 2000 });
262263
import { videoEmits, defineProps } from "./plugins/index";
263264
const props = defineProps(defineProps); //props
264265
const emits = defineEmits([
@@ -536,7 +537,6 @@ const init = (): void => {
536537
}
537538
// // 使用hls解码
538539
else if (Hls2.isSupported()) {
539-
const Hls = new Hls2({ fragLoadingTimeOut: 2000 });
540540
Hls.detachMedia(); //解除绑定
541541
Hls.attachMedia(state.dVideo);
542542
Hls.on(Hls2.Events.MEDIA_ATTACHED, () => {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue3-video-play",
3-
"version": "1.3.1-beta.5",
3+
"version": "1.3.1-beta.6",
44
"description": "hls.js player component for Vue3",
55
"files": [
66
"dist",

0 commit comments

Comments
 (0)