乐橙云小程序插件接入HbuilderX

乐橙插件使用:

1.配置app.json文件,uniapp中在mainfest.json中配置

https://uniapp.dcloud.net.cn/collocation/manifest.html#mp-weixin

**

2、集成插件页面.json文件

**

uniapp在 pages.json 对应页面的 style -> usingComponents 引入组件:

https://uniapp.dcloud.net.cn/tutorial/miniprogram-subject.html#小程序自定义组件支持

3、获取管理员token

参考地址:https://open.imou.com/document/pages/fef620/

请求地址:https://openapi.lechange.cn/openapi/accessToken

{

"system":{

"ver":"1.0",

"appId":"lc3128c72c34d74192",

"sign":"b7e5bbcc6cc07941725d9ad318883d8e",

"time":1599013514,

"nonce":"fbf19fc6-17a1-4f73-a967-75eadbc805a2"

},

"id":"98a7a257-c4e4-4db3-a2d3-d97a3836b87c",

"params":{

复制代码
}

}

获取临时权限校验秘钥---miniToken

参考地址:https://open.imou.com/document/pages/0b44e4/#_3、对接小程序插件

请求地址:https://openapi.lechange.cn/openapi/createWeChatMiniProgramToken

{

"system": {

"ver": "1.0",

"appId": "lcdxxxxxxxxx",

"sign": "xxxxxxxxxxxxxx",

"time": 1603370757,

"nonce": "1a411d5a-e88b-45ee-b590-53da98375edd"

},

"id": "sdf23423lkj32l4324",

"params": {

"token": "At_xxxxxxxxxxxxxxxxxx", //就是上面的管理员token

"deviceId": "9J07242PAZDED99",

"channelId": "0"

}

}

获取到miniToken后调用imou-player即可

4、使用

c 复制代码
<imou-player miniToken="miniToken" deviceId="deviceId"
			channelId="0" liveType='real' functionConfig='talk,snapShot,PTZ'
			playConfig='{"resolution": "HD", "voice": "on", "fullScreen": "off"}' height='300'
			bind:handleEvent="handleEvent">
相关推荐
weixin_lynhgworld17 小时前
盲盒抽谷机小程序系统开发:从0到1的完整方法论
小程序
weixin_lynhgworld17 小时前
短剧小程序系统开发:赋能创作者,推动短剧艺术创新发展
小程序
一匹电信狗20 小时前
【C++】异常详解(万字解读)
服务器·c++·算法·leetcode·小程序·stl·visual studio
说私域1 天前
基于开源AI智能客服、AI智能名片与S2B2C商城小程序的微商服务优化及复购转介绍提升策略研究
人工智能·小程序
熬耶2 天前
Uniapp之微信小程序自定义底部导航栏形态
微信小程序·小程序·uni-app
IT毕设实战小研2 天前
基于Spring Boot校园二手交易平台系统设计与实现 二手交易系统 交易平台小程序
java·数据库·vue.js·spring boot·后端·小程序·课程设计
weixin_177297220692 天前
剧本杀小程序系统开发:重构推理娱乐生态
小程序·重构·娱乐
IT毕设实战小研3 天前
基于SpringBoot的救援物资管理系统 受灾应急物资管理系统 物资管理小程序
java·开发语言·vue.js·spring boot·小程序·毕业设计·课程设计
程序员陆通4 天前
零基础AI编程开发微信小程序赚流量主广告实战
微信小程序·小程序·ai编程
paopaokaka_luck4 天前
校园快递小程序(腾讯地图API、二维码识别、Echarts图形化分析)
vue.js·spring boot·后端·小程序·uni-app