File tree Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 99 "preview": "vite preview"
1010 },
1111 "dependencies": {
12- "ezuikit-js": "^7.7.10 ",
12+ "ezuikit-js": "^8.0.0-beta.0 ",
1313 "vue": "^3.2.41"
1414 },
1515 "devDependencies": {
Original file line number Diff line number Diff line change @@ -94,9 +94,13 @@ const destroy = () => {
9494 destroyPromise.then((data: any) => {
9595 console.log("promise 获取 数据", data);
9696 });
97+ player = null;
9798};
9899
99- onMounted(() => {
100+ const init = () => {
101+ if (player) {
102+ destroy();
103+ }
100104 console.group("mounted 组件挂载完毕状态===============》");
101105 fetch("https://open.ys7.com/jssdk/ezopen/demo/token")
102106 .then((response) => response.json())
@@ -106,21 +110,26 @@ onMounted(() => {
106110 id: "video-container", // 视频容器ID
107111 accessToken: accessToken,
108112 url: "ezopen://open.ys7.com/G39444019/1.live",
109- // simple - 极简版; pcLive- pc直播; pcRec- pc回放; mobileLive- 移动端直播; mobileRec- 移动端回放;security - 安防版;voice- 语音版;
110- //template: ' simple' ,
113+ // simple: 极简版; pcLive: pc直播; pcRec: pc回放; mobileLive: 移动端直播; mobileRec: 移动端回放;security: 安防版; voice: 语音版;
114+ // template: " simple" ,
111115 plugin: ["talk"], // 加载插件,talk-对讲
112116 width: 600,
113- height: 400,
117+ height: 400
114118 });
115119 window.player = player;
116120 });
121+ };
122+
123+ onMounted(() => {
124+ init();
117125});
118126</script>
119127
120128<template>
121129 <div class="hello-ezuikit-js">
122130 <div id="video-container" style="width: 600px; height: 400px"></div>
123131 <div>
132+ <button @click="init">init</button>
124133 <button @click="stop">stop</button>
125134 <button @click="play">play</button>
126135 <button @click="openSound">openSound</button>
Original file line number Diff line number Diff line change @@ -308,10 +308,10 @@ estree-walker@^2.0.2:
308308 resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac"
309309 integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==
310310
311- ezuikit-js@^7.7.10-alpha.1 :
312- version "7.7.10-alpha.1 "
313- resolved "https://registry.yarnpkg.com/ezuikit-js/-/ezuikit-js-7.7.10-alpha.1 .tgz#04f9f108b141cbd33525453749385478e890b54c "
314- integrity sha512-7KEq4t54vlwQXihM/cCSocFXQ+fsT8M2Xx/lhHPh4VUp9NlLTWBt0TMgteWNLaxtinbFAnCbI+8ma7h2Srr+LA ==
311+ ezuikit-js@^8.0.0-beta.0 :
312+ version "8.0.0-beta.0 "
313+ resolved "https://registry.yarnpkg.com/ezuikit-js/-/ezuikit-js-8.0.0-beta.0 .tgz#3285091f3dbf5f29a422db6a66810056105e5ee0 "
314+ integrity sha512-VH3d8xO/HJhEyyiLF91/cSzmFND6SuCtrBVX2Sr8AyY9sxwy5ZSVu75/gITt9HJIAXh6qsGb4Vu9Fb7lD8wBVw ==
315315
316316fsevents@~2.3.2:
317317 version "2.3.3"
You can’t perform that action at this time.
0 commit comments