This commit is contained in:
cxc
2022-10-20 23:12:29 +08:00
parent 41c1bce422
commit cb3fdc2ce7
11 changed files with 193 additions and 102 deletions

View File

@ -38,15 +38,20 @@ const props = defineProps({
type: [String, Number],
default: 420,
},
source: {
type: String,
default:
"https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv",
},
});
const { width, height } = toRefs(props);
const { width, height, source } = toRefs(props);
const videoElementRef = ref();
// const playBtnRef = ref();
let flvPlayer = flvjs.createPlayer({
type: "flv",
url: "https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv",
url: source.value,
// url: "http://localhost:8000/lycoris_recoil.flv",
});