File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ <h2>预览,回放功能示例:</h2>
5252 < button id ="getOSDTime "> 获取OSD时间</ button >
5353 < button id ="openSound "> 打开声音(默认已经开启)</ button >
5454 < button id ="capturePicture "> 视频截图</ button >
55+ < button id ="startSave "> 开始录像</ button >
56+ < button id ="stopSave "> 停止录像</ button >
57+ < span > 录制功能不支持加密视频,且录制的文件需要< a href ="https://service.ys7.com/downloadInfoSite/admin " target ="_blank "> 下载海康播放器播放</ a > </ span >
5558
5659 </ div >
5760 < div id ="playWind " style ="width: 600px; height: 400px; ">
@@ -115,7 +118,13 @@ <h2>预览,回放功能示例:</h2>
115118 decoder . openSound ( ) ;
116119 } )
117120 $ ( "#capturePicture" ) . click ( function ( ) {
118- decoder . capturePicture ( 0 , 'picName' ) ;
121+ decoder . capturePicture ( 0 , 'default' ) ;
122+ } )
123+ $ ( "#startSave" ) . click ( function ( ) {
124+ decoder . startSave ( 0 , ( new Date ( ) . getTime ( ) + 'video' ) ) ;
125+ } )
126+ $ ( "#stopSave" ) . click ( function ( ) {
127+ decoder . stopSave ( 0 ) ;
119128 } )
120129 $ ( "#play" ) . click ( function ( ) {
121130 decoder . play ( ) ;
Original file line number Diff line number Diff line change 11631163 // 开始录像
11641164 EZUIPlayer . prototype . startSave = function ( iWind , fileName ) {
11651165 if ( ! ! this . jSPlugin ) {
1166+ this . log ( "开始录制录像" ) ;
11661167 this . jSPlugin . JS_StartSave ( iWind , fileName )
11671168 } else {
11681169 throw new Error ( "Method not support" ) ;
11711172 // 结束录像
11721173 EZUIPlayer . prototype . stopSave = function ( iWind ) {
11731174 if ( ! ! this . jSPlugin ) {
1174- this . jSPlugin . JS_StopSave ( iWind )
1175+ this . jSPlugin . JS_StopSave ( iWind ) ;
1176+ this . log ( "结束录制录像" ) ;
11751177 } else {
11761178 throw new Error ( "Method not support" ) ;
11771179 }
You can’t perform that action at this time.
0 commit comments