@@ -9,6 +9,8 @@ const Player = () => {
99 const urlRef = useRef ( ) ;
1010 /** @type {React.MutableRefObject<HTMLInputElement> } */
1111 const accessTokenRef = useRef ( ) ;
12+ /** @type {React.MutableRefObject<HTMLInputElement> } */
13+ const staticPathRef = useRef ( ) ;
1214
1315 const initPlayer = useCallback ( ( ) => {
1416 if ( document . getElementById ( "player-container" ) ) {
@@ -40,6 +42,23 @@ const Player = () => {
4042 // The default domain is https://open.ys7.com If it is a private deployment or overseas (outside of China) environment, please configure the corresponding domain
4143 domain : "https://open.ys7.com" ,
4244 } ,
45+ // 日志打印设置
46+ loggerOptions : {
47+ // player.setLoggerOptions(options)
48+ level : "INFO" , // INFO LOG WARN ERROR
49+ name : "ezuikit" ,
50+ showTime : true ,
51+ } ,
52+ // 视频流的信息回调类型
53+ /**
54+ * 打开流信息回调,监听 streamInfoCB 事件
55+ * 0 : 每次都回调
56+ * 1 : 只回调一次
57+ * 注意:会影响性能
58+ * 默认值 1
59+ */
60+ streamInfoCBType : 1 ,
61+ staticPath : staticPathRef . current ?. value . trim ( ) || undefined , // 如果想使用本地静态资源,请复制根目录下ezuikit_static 到当前目录下, 然后设置该值
4362 } ) ;
4463 }
4564 } , [ ] ) ;
@@ -136,11 +155,31 @@ const Player = () => {
136155 < div id = "player-container" > </ div >
137156 </ div >
138157 < div >
139- url: < input type = "text" ref = { urlRef } style = { { width : 500 } } />
158+ url:{ " " }
159+ < input
160+ type = "text"
161+ ref = { urlRef }
162+ style = { { width : 500 } }
163+ defaultValue = "ezopen://open.ys7.com/BC7799091/1.hd.live"
164+ />
140165 </ div >
141166 < div >
142167 accessToken:
143- < input type = "text" ref = { accessTokenRef } style = { { width : 500 } } />
168+ < input
169+ type = "text"
170+ ref = { accessTokenRef }
171+ style = { { width : 500 } }
172+ defaultValue = "at.1gskp9sk9h5t0qzkb9njljgec9szaqkq-4qrit4qict-0r92aaq-ef8rzzvhg"
173+ />
174+ </ div >
175+ < div >
176+ staticPath:
177+ < input
178+ type = "text"
179+ ref = { staticPathRef }
180+ style = { { width : 500 } }
181+ defaultValue = ""
182+ />
144183 </ div >
145184 < div >
146185 < button onClick = { initPlayer } > init</ button >
0 commit comments