@@ -9,6 +9,8 @@ const Player = () => {
9
9
const urlRef = useRef ( ) ;
10
10
/** @type {React.MutableRefObject<HTMLInputElement> } */
11
11
const accessTokenRef = useRef ( ) ;
12
+ /** @type {React.MutableRefObject<HTMLInputElement> } */
13
+ const staticPathRef = useRef ( ) ;
12
14
13
15
const initPlayer = useCallback ( ( ) => {
14
16
if ( document . getElementById ( "player-container" ) ) {
@@ -40,6 +42,23 @@ const Player = () => {
40
42
// 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
41
43
domain : "https://open.ys7.com" ,
42
44
} ,
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 到当前目录下, 然后设置该值
43
62
} ) ;
44
63
}
45
64
} , [ ] ) ;
@@ -136,11 +155,31 @@ const Player = () => {
136
155
< div id = "player-container" > </ div >
137
156
</ div >
138
157
< 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
+ />
140
165
</ div >
141
166
< div >
142
167
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
+ />
144
183
</ div >
145
184
< div >
146
185
< button onClick = { initPlayer } > init</ button >
0 commit comments