Skip to content

Commit bb660a9

Browse files
committed
feat: update
1 parent b219802 commit bb660a9

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

demos/with-uniapp-vue3/src/components/Player.vue

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,24 @@ const init = () => {
102102
if (player) {
103103
destroy();
104104
}
105-
console.group("mounted 组件挂载完毕状态===============》");
105+
106+
const systemInfo = uni.getSystemInfoSync();
107+
const windowWidth = systemInfo.windowWidth;
108+
109+
console.group("mounted 组件挂载完毕状态===============》", systemInfo);
106110
// fetch("https://open.ys7.com/jssdk/ezopen/demo/token")
107111
// .then((response) => response.json())
108112
// .then((res) => {
109113
// var accessToken = res.data.accessToken;
110114
player = new EZUIKitPlayer({
111115
id: "video-container", // 视频容器ID
112116
accessToken:
113-
"at.81ka7utw1wvjh6e8226coblq4vft3bwq-7i0oq4su3q-0ninxy7-qukjsqtbx",
114-
url: "ezopen://open.ys7.com/BC7799091/1.hd.live",
117+
"at.4dd7o6hgdb9ywl9c283g0hj27e789uru-2a5ejk6tkf-19b1cb1-azyfqm3a",
118+
url: "ezopen://open.ys7.com/C69625501/1.hd.live",
115119
// simple: 极简版; pcLive: pc直播; pcRec: pc回放; mobileLive: 移动端直播; mobileRec: 移动端回放;security: 安防版; voice: 语音版;
116120
template: "mobileLive",
117121
plugin: ["talk"], // 加载插件,talk-对讲
118-
width: window.innerWidth || 600,
122+
width: windowWidth || 375,
119123
height: 300,
120124
// quality: 1, //
121125
// language: "en", // zh | en
@@ -187,7 +191,7 @@ onMounted(() => {
187191
<template>
188192
<div class="hello-ezuikit-js">
189193
<div>
190-
<div id="video-container" style="width: 600px; height: 400px"></div>
194+
<div id="video-container" style="width: 100%;height: 300px"></div>
191195
</div>
192196
<div>
193197
<button @click="init">init</button>

0 commit comments

Comments
 (0)