Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5da231e

Browse files
committed
debug(vue): update deps
1 parent 57ea552 commit 5da231e

File tree

3 files changed

+30
-21
lines changed

3 files changed

+30
-21
lines changed

demos/vue-demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"dependencies": {
1212
"core-js": "^3.6.5",
13-
"ezuikit-js": "^7.7.10",
13+
"ezuikit-js": "^8.0.0-beta.0",
1414
"vue": "^2.7"
1515
},
1616
"devDependencies": {

demos/vue-demo/src/components/EZUIKitJs.vue

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<div class="hello-ezuikit-js">
33
<div id="video-container" style="width: 600px; height: 400px"></div>
44
<div>
5+
<button v-on:click="init">init</button>
56
<button v-on:click="stop">stop</button>
67
<button v-on:click="play">play</button>
78
<button v-on:click="openSound">openSound</button>
@@ -29,24 +30,31 @@ export default {
2930
},
3031
mounted: () => {
3132
console.group("mounted 组件挂载完毕状态===============》");
32-
fetch("https://open.ys7.com/jssdk/ezopen/demo/token")
33-
.then((response) => response.json())
34-
.then((res) => {
35-
var accessToken = res.data.accessToken;
36-
player = new EZUIKit.EZUIKitPlayer({
37-
id: "video-container", // 视频容器ID
38-
accessToken: accessToken,
39-
url: "ezopen://open.ys7.com/G39444019/1.live",
40-
// simple - 极简版; pcLive-pc直播;pcRec-pc回放;mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版;
41-
//template: 'simple',
42-
plugin: ["talk"], // 加载插件,talk-对讲
43-
width: 600,
44-
height: 400
45-
});
46-
window.player = player;
47-
});
4833
},
4934
methods: {
35+
init() {
36+
if (player) {
37+
this.destroy();
38+
}
39+
40+
fetch("https://open.ys7.com/jssdk/ezopen/demo/token")
41+
.then((response) => response.json())
42+
.then((res) => {
43+
var accessToken = res.data.accessToken;
44+
player = new EZUIKit.EZUIKitPlayer({
45+
id: "video-container", // 视频容器ID
46+
accessToken:
47+
"at.dynmds5wcjnjbtls3lf7tuwu13aobjm2-490yt3xp77-0gl3ntq-44scndtqf",
48+
url: "ezopen://open.ys7.com/G39444019/1.live",
49+
// simple: 极简版; pcLive: pc直播; pcRec: pc回放; mobileLive: 移动端直播; mobileRec: 移动端回放;security: 安防版; voice: 语音版;
50+
template: "pcLive",
51+
plugin: ["talk"], // 加载插件,talk-对讲
52+
width: 600,
53+
height: 400
54+
});
55+
window.player = player;
56+
});
57+
},
5058
play() {
5159
var playPromise = player.play();
5260
playPromise.then((data) => {
@@ -111,6 +119,7 @@ export default {
111119
destroyPromise.then((data) => {
112120
console.log("promise 获取 数据", data);
113121
});
122+
player = null;
114123
}
115124
}
116125
};

demos/vue-demo/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2864,10 +2864,10 @@ express@^4.17.3:
28642864
utils-merge "1.0.1"
28652865
vary "~1.1.2"
28662866

2867-
ezuikit-js@^7.7.10-alpha.1:
2868-
version "7.7.10-alpha.2"
2869-
resolved "https://registry.yarnpkg.com/ezuikit-js/-/ezuikit-js-7.7.10-alpha.2.tgz#f58fee14f82d2e1e02be8e9030505e1a2b83cd3d"
2870-
integrity sha512-qQBW1TaLWo3zdIsYLxIvoj7jMBt9Izg5+k8TNf5+1TzZxF7sSm/AntMESbOYvw0G4M8MrH0BH5gS/XNkE6CWgQ==
2867+
ezuikit-js@^8.0.0-beta.0:
2868+
version "8.0.0-beta.0"
2869+
resolved "https://registry.yarnpkg.com/ezuikit-js/-/ezuikit-js-8.0.0-beta.0.tgz#3285091f3dbf5f29a422db6a66810056105e5ee0"
2870+
integrity sha512-VH3d8xO/HJhEyyiLF91/cSzmFND6SuCtrBVX2Sr8AyY9sxwy5ZSVu75/gITt9HJIAXh6qsGb4Vu9Fb7lD8wBVw==
28712871

28722872
fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
28732873
version "3.1.3"

0 commit comments

Comments
 (0)