@@ -102,20 +102,24 @@ const init = () => {
102
102
if (player ) {
103
103
destroy ();
104
104
}
105
- console .group (" mounted 组件挂载完毕状态===============》" );
105
+
106
+ const systemInfo = uni .getSystemInfoSync ();
107
+ const windowWidth = systemInfo .windowWidth ;
108
+
109
+ console .group (" mounted 组件挂载完毕状态===============》" , systemInfo );
106
110
// fetch("https://open.ys7.com/jssdk/ezopen/demo/token")
107
111
// .then((response) => response.json())
108
112
// .then((res) => {
109
113
// var accessToken = res.data.accessToken;
110
114
player = new EZUIKitPlayer ({
111
115
id: " video-container" , // 视频容器ID
112
116
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" ,
115
119
// simple: 极简版; pcLive: pc直播; pcRec: pc回放; mobileLive: 移动端直播; mobileRec: 移动端回放;security: 安防版; voice: 语音版;
116
120
template: " mobileLive" ,
117
121
plugin: [" talk" ], // 加载插件,talk-对讲
118
- width: window . innerWidth || 600 ,
122
+ width: windowWidth || 375 ,
119
123
height: 300 ,
120
124
// quality: 1, //
121
125
// language: "en", // zh | en
@@ -187,7 +191,7 @@ onMounted(() => {
187
191
<template >
188
192
<div class =" hello-ezuikit-js" >
189
193
<div >
190
- <div id =" video-container" style =" width : 600 px ; height : 400 px " ></div >
194
+ <div id =" video-container" style =" width : 100 % ; height : 300 px " ></div >
191
195
</div >
192
196
<div >
193
197
<button @click =" init" >init</button >
0 commit comments