forked from integrated_whb/integrated_whb_vue
init
parent
eb5cd17c49
commit
bab6fe50b8
|
@ -13,7 +13,14 @@ defineOptions({
|
|||
const props = defineProps({
|
||||
source: {
|
||||
type: [String, Array],
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
vid: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
playAuth: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
cover: {
|
||||
|
@ -32,9 +39,9 @@ const props = defineProps({
|
|||
const visibility = useDocumentVisibility();
|
||||
onMounted(() => {
|
||||
watch(
|
||||
() => props.source,
|
||||
[() => props.source, () => props.vid, () => props.playAuth],
|
||||
() => {
|
||||
if (props.source) fnCreateAliPlayer();
|
||||
if (props.source || (props.vid && props.playAuth)) fnCreateAliPlayer();
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
|
@ -61,6 +68,8 @@ const fnCreateAliPlayer = async () => {
|
|||
{
|
||||
id: "J_prismPlayer",
|
||||
source: props.source,
|
||||
vid: props.vid,
|
||||
playauth: props.playAuth,
|
||||
cover: props.cover,
|
||||
width: props.width,
|
||||
height: props.height,
|
||||
|
|
Loading…
Reference in New Issue