@@ -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 : 600 px ; height : 400 px " ></div >
194+ <div id =" video-container" style =" width : 100 % ; height : 300 px " ></div >
191195 </div >
192196 <div >
193197 <button @click =" init" >init</button >
0 commit comments