1010 < div className ="demo ">
1111 < h2 > 视频模式使用示例:</ h2 >
1212 < div id ="video-container "
13- style ="width:375px ; "
13+ style ="width:800px ; "
1414 >
1515 </ div >
1616 < div >
@@ -25,14 +25,15 @@ <h2>视频模式使用示例:</h2>
2525 < button onClick ="stopSave() "> stopSave</ button >
2626 < button onClick ="startTalk() "> 开始对讲</ button >
2727 < button onClick ="stopTalk() "> 结束对讲</ button >
28+ < button onClick ="fullScreen() "> 全屏</ button >
2829 </ div >
2930 < p style ="font-style: italic; "> 播放多个视频,可初始化多个实例,参考:/demos/base-demo/multi-demo</ p >
3031 </ div >
3132 < script >
3233 var playr = new EZUIKit . EZUIKitPlayer ( {
3334 id : 'video-container' , // 视频容器ID
34- accessToken : 'at.8x4s0qfo28pq5i8w75o85fb224s9gl56-5bzotmogxc-0coxgke-e9jw98glk ' ,
35- url : 'ezopen://open.ys7.com/C69594192 /1.live' ,
35+ accessToken : 'at.1yjuprkk36992fts8qw4f0ladd9lju2y-1744sk6eh7-00cbr9r-ypsznozt8 ' ,
36+ url : 'ezopen://open.ys7.com/203751922 /1.live' ,
3637 template : 'simple' , // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版;
3738 autoplay : true ,
3839 // 视频上方头部控件
@@ -51,13 +52,19 @@ <h2>视频模式使用示例:</h2>
5152 fullScreenChangeCallBack : ( data ) => console . log ( "全屏变化回调" , data ) ,
5253 getOSDTimeCallBack : ( data ) => console . log ( "获取OSDTime回调" , data ) ,
5354 handleSuccess : ( data ) = function ( ) { console . log ( "播放成功回调" , data ) } ,
54- handleError : ( data ) => console . log ( "播放失败回调 " , data ) ,
55+ handleError : ( data ) => console . log ( "播放失败回调1 " , data ) ,
5556 handleTalkSuccess : ( ) => console . log ( "对讲成功回掉" ) ,
5657 handleTalkError : ( data ) = function ( ) { console . log ( "对讲失败" , data ) } ,
5758 decoderVersion : "v3.4" ,
58- width :375 ,
59- height :400 ,
59+ width :800 ,
60+ height :600 ,
6061 } ) ;
62+ function fullScreen ( ) {
63+ var playPromise = playr . fullScreen ( ) ;
64+ playPromise . then ( ( data ) => {
65+ console . log ( "promise 获取 数据" , data )
66+ } )
67+ }
6168 function play ( ) {
6269 var playPromise = playr . play ( ) ;
6370 playPromise . then ( ( data ) => {
0 commit comments