更新时间:2024-06-13 09:56:54下载pdf
涂鸦门锁 SDK 提供 Wi-Fi 智能门锁的实时视频查看和对讲等基础能力。
演示录屏 | 类 | 接口 | 描述 |
---|---|---|---|
ThingSmartWiFiLockDevice | - (void)startPreviewWithDefinition :success:failure; | 开始播放实时视频 | |
ThingSmartWiFiLockDevice | - (void)stopPreview; | 停止播放实时视频 | |
ThingSmartWiFiLockDevice |
- (void)startTalk;
- (void)stopTalk; |
开启对讲/关闭对讲 |
当不再使用相关功能时,调用销毁方法,避免程序发生异常。拿到 ThingSmartWi-FiLockDevice
对象,分别调用 stopPreview
、stopTalk
、dealloc
等方法进行销毁。
//初始化
self.lockDevice = [[ThingSmartWi-FiLockDevice alloc] initWithDeviceId:self.device.deviceModel.devId];
//设置代理
self.lockDevice.delegate = self;
[self.lockDevice startPreviewWithDefinition:0x2
//TODO
} failure:^(NSError *error) {
//TODO
}];
[self.lockDevice stopPreview];
///Event Handler
- (void)buttonClick_StartTalk:(id)sender {
BOOL isTalking = [self.lockDevice isTalking];
BOOL isSupportedTalk = [self.lockDevice isSupportedTalk];
if(!isTalking && isSupportedTalk){
[self.lockDevice startTalk];
}
}
- (void)dealloc {
[self.lockDevice stopTalk];
}
该内容对您有帮助吗?
是意见反馈该内容对您有帮助吗?
是意见反馈