Javawang

1准备工作 , 加载apicloud 海康视频模块。 

引入 SDK 重新生成项目测试 再config.xml写入appid

话不多说直接上代码 

    video=api.require("haikangVideo");
                        video.open({
                                ip:ip,
                                port:port,
                                channel:\'1\',
                                user:name,
                                pwd:pwd,
                                fixedOn: api.frameName,
                                fixed: true,
                                rect : {
                                     x :  0,
                                     y : api.frameHeight /5.5,
                                     w : api.frameWidth ,
                                     h : api.frameHeight / 2
                              },
                        },function(ret, err){
                         if( ret.status ){
                                video.play();
                         }else{
                                alert( JSON.stringify( err ) );
                         }
                        });

                        api.toast({
                             msg: \'打开成功\',
                             duration: 2000,
                             location: \'middle\'
                        });
View Code

 

切记 一定要放在方法内使用

 

分类:

技术点:

相关文章:

  • 2022-02-05
  • 2021-05-19
  • 2021-12-31
  • 2021-06-30
  • 2022-01-02
  • 2021-12-29
猜你喜欢
  • 2022-01-02
  • 2022-01-02
  • 2021-11-18
  • 2021-11-19
  • 2021-12-28
  • 2021-10-11
  • 2022-01-02
相关资源
相似解决方案