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