@tencentcloud/sdk-mcp 1.7.7 → 1.7.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +7 -9
- package/index.js +8 -8
- package/knowledge/chunker.js +1 -0
- package/knowledge/doc-url-resolver.js +16 -9
- package/knowledge/embedding/build-vectors.js +92 -0
- package/knowledge/embedding/embed-model.js +41 -0
- package/knowledge/embedding/vector-augment.js +126 -0
- package/knowledge/embedding/vector-index.js +70 -0
- package/knowledge/frontmatter-meta.js +23 -0
- package/knowledge/path-meta.js +56 -0
- package/knowledge/search/exact-lookup.js +145 -16
- package/knowledge/search/filter-pool.js +77 -33
- package/knowledge/search/rank-profile.js +25 -0
- package/knowledge/search/requires-framework.js +4 -1
- package/knowledge/search/search-core.js +74 -13
- package/knowledge/search/search-knowledge.js +24 -34
- package/knowledge/search/search-pass.js +495 -169
- package/knowledge/search/url-row-scorer.js +24 -6
- package/package.json +3 -1
- package/resource/index/manifest.json +1 -1
- package/resource/index/vectors/index.json +4 -0
- package/resource/integration/callkit/preset/android/integration.md +0 -2
- package/resource/integration/callkit/preset/ios/integration.md +0 -2
- package/resource/integration/chat/preset/react/integration.md +9 -5
- package/resource/integration/chat/preset/uni-app/integration.md +4 -0
- package/resource/integration/chat/preset/vue/integration.md +10 -6
- package/resource/integration/livekit/preset/live/android/prepare-integration.md +0 -4
- package/resource/integration/livekit/preset/live/ios/prepare-integration.md +0 -4
- package/resource/integration/roomkit/preset/vue/integration.md +154 -208
- package/resource/knowledge/callkit/best-practice/android/video-chat-dating.md +0 -2
- package/resource/knowledge/callkit/core-sdk/android/answer-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/android/make-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +0 -4
- package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/flutter/offline-push.md +0 -2
- package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/ios/make-call.md +0 -4
- package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +0 -2
- package/resource/knowledge/callkit/core-sdk/uni-app/answer-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/uni-app/make-call.md +0 -2
- package/resource/knowledge/callkit/faq/ios.md +0 -2
- package/resource/knowledge/callkit/faq/uniapp-app.md +0 -2
- package/resource/knowledge/callkit/preset/miniprogram/integration.md +2 -3
- package/resource/knowledge/callkit/preset/miniprogram/uniapp-integration.md +0 -2
- package/resource/knowledge/chat/preset/ios-uikit/integration.md +0 -16
- package/resource/knowledge/chat/preset/react/h5/integration.md +16 -5
- package/resource/knowledge/chat/preset/vue/features/conversation-list.md +6 -3
- package/resource/knowledge/chat/preset/vue/h5/integration.md +7 -4
- package/resource/knowledge/iot/app/activate-service.md +95 -0
- package/resource/knowledge/iot/app/demo/android.md +93 -0
- package/resource/knowledge/iot/app/demo/ios.md +87 -0
- package/resource/knowledge/iot/app/demo/miniprogram.md +79 -0
- package/resource/knowledge/iot/app/device-binding.md +378 -0
- package/resource/knowledge/iot/app/device-sharing.md +414 -0
- package/resource/knowledge/iot/app/family-management.md +762 -0
- package/resource/knowledge/iot/app/integration/android.md +328 -0
- package/resource/knowledge/iot/app/integration/harmonyos.md +326 -0
- package/resource/knowledge/iot/app/integration/ios.md +351 -0
- package/resource/knowledge/iot/app/integration/miniprogram.md +268 -0
- package/resource/knowledge/iot/app/monitor-playback.md +557 -0
- package/resource/knowledge/iot/app/remote-control.md +139 -0
- package/resource/knowledge/iot/app/video-call.md +559 -0
- package/resource/knowledge/iot/app/wechat-call/device-call-miniprogram.md +204 -0
- package/resource/knowledge/iot/app/wechat-call/miniprogram-call-device.md +193 -0
- package/resource/knowledge/iot/client-api/app/android/txiotcallsession.md +189 -0
- package/resource/knowledge/iot/client-api/app/android/txiotcloudstorage.md +77 -0
- package/resource/knowledge/iot/client-api/app/android/txiotdevicemanager.md +175 -0
- package/resource/knowledge/iot/client-api/app/android/txiotengine.md +172 -0
- package/resource/knowledge/iot/client-api/app/android/txiotenginedef.md +163 -0
- package/resource/knowledge/iot/client-api/app/android/txiotfamilymanager.md +146 -0
- package/resource/knowledge/iot/client-api/app/android/txiotmonitorsession.md +246 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotcallsession.md +191 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotcloudstorage.md +77 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotdevicemanager.md +183 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotengine.md +186 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotenginedef.md +164 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotfamilymanager.md +150 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotmonitorsession.md +252 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotcallsession.md +199 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotcloudstorage.md +76 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotdevicemanager.md +173 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotengine.md +173 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotenginedef.md +171 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotfamilymanager.md +146 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotmonitorsession.md +250 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotcallsession.md +180 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotcloudstorage.md +76 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotdevicemanager.md +281 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotengine.md +183 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotenginedef.md +152 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotfamilymanager.md +179 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotmonitorsession.md +226 -0
- package/resource/knowledge/iot/client-api/device/android-smart-device.md +813 -0
- package/resource/knowledge/iot/client-api/device/linux-rtos-device.md +2027 -0
- package/resource/knowledge/iot/device/activate-service.md +167 -0
- package/resource/knowledge/iot/device/ai-voice-chat/advanced-features/custom-agent.md +171 -0
- package/resource/knowledge/iot/device/ai-voice-chat/advanced-features/smart-device-control.md +721 -0
- package/resource/knowledge/iot/device/ai-voice-chat/integration-guide/android-smart-device.md +247 -0
- package/resource/knowledge/iot/device/ai-voice-chat/integration-guide/linux-rtos-device.md +368 -0
- package/resource/knowledge/iot/device/ai-voice-chat/overview.md +84 -0
- package/resource/knowledge/iot/device/cloud-storage.md +696 -0
- package/resource/knowledge/iot/device/data-model.md +972 -0
- package/resource/knowledge/iot/device/demo/android-smart-device.md +97 -0
- package/resource/knowledge/iot/device/demo/linux-rtos-device.md +106 -0
- package/resource/knowledge/iot/device/device-ota-upgrade.md +237 -0
- package/resource/knowledge/iot/device/dynamic-registration/android-smart-device.md +275 -0
- package/resource/knowledge/iot/device/dynamic-registration/linux-rtos-device.md +297 -0
- package/resource/knowledge/iot/device/login-and-register/android-smart-device.md +131 -0
- package/resource/knowledge/iot/device/login-and-register/linux-rtos-device.md +291 -0
- package/resource/knowledge/iot/device/monitor-pushing/android-smart-device.md +237 -0
- package/resource/knowledge/iot/device/monitor-pushing/linux-rtos-device.md +493 -0
- package/resource/knowledge/iot/device/video-call/android-smart-device.md +299 -0
- package/resource/knowledge/iot/device/video-call/linux-rtos-device.md +465 -0
- package/resource/knowledge/iot/device/wechat-call/android-smart-device.md +534 -0
- package/resource/knowledge/iot/device/wechat-call/linux-rtos-device.md +681 -0
- package/resource/knowledge/iot/kids-watch/overview.md +28 -0
- package/resource/knowledge/iot/security-camera/activate-service.md +74 -0
- package/resource/knowledge/iot/security-camera/monitor-playback/app-integration.md +302 -0
- package/resource/knowledge/iot/security-camera/monitor-playback/device-integration/android.md +237 -0
- package/resource/knowledge/iot/security-camera/monitor-playback/device-integration/linux-rtos.md +493 -0
- package/resource/knowledge/iot/security-camera/overview.md +31 -0
- package/resource/knowledge/iot/security-camera/ptz-control.md +153 -0
- package/resource/knowledge/iot/security-camera/recording-and-snapshot.md +182 -0
- package/resource/knowledge/iot/security-camera/voice-intercom.md +174 -0
- package/resource/knowledge/iot/smart-vision/serviceoverview.md +114 -0
- package/resource/knowledge/iot/voice-recorder/app-demo.md +99 -0
- package/resource/knowledge/iot/voice-recorder/device-demo.md +189 -0
- package/resource/knowledge/iot/voice-recorder/overview.md +64 -0
- package/resource/knowledge/livekit/core-sdk/features/android/base-beauty.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/android/gift.md +0 -4
- package/resource/knowledge/livekit/core-sdk/features/android/live-list.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/flutter/audio-effect.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/flutter/base-beauty.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/flutter/gift.md +0 -4
- package/resource/knowledge/livekit/core-sdk/features/ios/base-beauty.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/ios/gift.md +0 -4
- package/resource/knowledge/livekit/core-sdk/features/ios/live-list.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/uni-app/base-beauty.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/uni-app/gift.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/android/co-guest-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/android/host-interaction.md +0 -10
- package/resource/knowledge/livekit/core-sdk/live/android/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/live/flutter/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/live/flutter/host-interaction.md +0 -10
- package/resource/knowledge/livekit/core-sdk/live/flutter/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/live/ios/co-guest-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/ios/host-interaction.md +0 -10
- package/resource/knowledge/livekit/core-sdk/live/ios/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/live/uni-app/co-guest-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/uni-app/host-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/uni-app/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/android/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/android/host-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/voice/android/integration.md +0 -4
- package/resource/knowledge/livekit/core-sdk/voice/flutter/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/ios/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/ios/host-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/voice/ios/integration.md +0 -4
- package/resource/knowledge/livekit/core-sdk/voice/uni-app/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/uni-app/integration.md +0 -2
- package/resource/knowledge/livekit/faq/error-code.md +0 -2
- package/resource/knowledge/push/config/android/honor.md +16 -1
- package/resource/knowledge/push/config/android/huawei.md +20 -4
- package/resource/knowledge/push/config/android/meizu.md +19 -5
- package/resource/knowledge/push/config/android/vivo.md +20 -1
- package/resource/knowledge/push/config/donut.md +0 -2
- package/resource/knowledge/push/config/harmonyos.md +21 -5
- package/resource/knowledge/push/integration/android.md +0 -5
- package/resource/knowledge/push/integration/donut.md +0 -3
- package/resource/knowledge/push/integration/flutter.md +1 -4
- package/resource/knowledge/push/integration/harmonyos.md +0 -3
- package/resource/knowledge/push/integration/ios.md +0 -3
- package/resource/knowledge/push/integration/react-native.md +0 -5
- package/resource/knowledge/push/integration/uni-app.md +0 -3
- package/resource/knowledge/push/integration/unity.md +0 -3
- package/resource/knowledge/push/integration/unreal-engine.md +0 -3
- package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/android/room-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/flutter/call-user-to-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/flutter/room-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/flutter/schedule-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/ios/call-user-to-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/ios/room-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/ios/schedule-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/vue/room-view.md +0 -3
- package/resource/knowledge/roomkit/preset/uniapp-app/integration.md +18 -14
- package/resource/knowledge/rtcengine/web/how_to_run_web_sdk_demo.md +0 -2
- package/resource/knowledge/rtcengine/web/plugin/23-advanced-support-detection.md +30 -0
- package/resource/knowledge/rtcengine/web/plugin/24-advanced-network-quality.md +0 -2
- package/resource/knowledge/rtcengine/web/plugin/31-advanced-plugins-overview.md +1 -1
- package/resource/knowledge/rtcengine/web/plugin/35-advanced-ai-denoiser.md +1 -1
- package/resource/knowledge/rtcengine/web/plugin/36-advanced-virtual-background.md +4 -0
- package/resource/knowledge/trtc/android/TRTCCloud.md +94 -85
- package/resource/knowledge/trtc/android/TRTCCloudDef.md +48 -46
- package/resource/knowledge/trtc/android/TRTCCloudListener.md +48 -48
- package/resource/knowledge/trtc/android/TXAudioEffectManager.md +18 -18
- package/resource/knowledge/trtc/android/TXDeviceManager.md +4 -4
- package/resource/knowledge/trtc/android/TXLiteAVCode.md +1 -0
- package/resource/knowledge/trtc/c++/ITRTCCloud.md +90 -90
- package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +18 -18
- package/resource/knowledge/trtc/c++/ITXDeviceManager.md +9 -9
- package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +47 -47
- package/resource/knowledge/trtc/c++/TRTCTypeDef.md +47 -45
- package/resource/knowledge/trtc/c++/TXLiteAVCode.md +1 -0
- package/resource/knowledge/trtc/ios/TRTCCloud.md +93 -93
- package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +50 -50
- package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +8 -8
- package/resource/knowledge/trtc/ios/TXDeviceManager.md +9 -9
- package/resource/knowledge/trtc/ios/TXLiteAVCode.md +1 -0
- package/resource/knowledge/trtc/ios/TXLiveSDKTypeDef.md +48 -46
- package/server-config.js +8 -9
- package/server.js +1 -1
- package/tools/common/finalize_answer.js +1 -1
- package/tools/common/present_framework_choice.js +1 -1
- package/tools/common/search_trtc_knowledge.js +22 -3
- package/tools/definitions/search_trtc_knowledge_def.js +3 -2
- package/utils/preflight-route.js +19 -2
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
---
|
|
2
|
+
product: iot
|
|
3
|
+
framework:
|
|
4
|
+
- ios
|
|
5
|
+
types:
|
|
6
|
+
- api
|
|
7
|
+
retrievable_scope: always
|
|
8
|
+
feature_domain: client_api
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 概述
|
|
12
|
+
|
|
13
|
+
TXIoTMonitorSession 负责拉取设备实时监控画面,包括开始/停止会话、远端拉流与清晰度切换、与设备进行对讲、云台控制、截图与本地录制。TXIoTMonitorSession 通过 TXIoTEngine.getMonitorSession 获取实例,需在 TXIoTEngine 登录成功后调用。
|
|
14
|
+
|
|
15
|
+
> **说明:**
|
|
16
|
+
> 回调模型:监控事件通过 `TXIoTMonitorSessionDelegate` 协议回调,所有 Delegate 回调在主线程触发。公共类型与错误码定义见 TXIoTEngineDef。
|
|
17
|
+
>
|
|
18
|
+
|
|
19
|
+
## 方法列表
|
|
20
|
+
|
|
21
|
+
|方法签名|描述|
|
|
22
|
+
|---------|---------|
|
|
23
|
+
|addDelegate:|添加实时监控事件代理。|
|
|
24
|
+
|removeDelegate:|移除实时监控事件代理。|
|
|
25
|
+
|startSession:|启动实时监控会话。|
|
|
26
|
+
|stopSession|停止实时监控会话。|
|
|
27
|
+
|startRemoteView:streamType:view:|开始远端拉流和渲染。|
|
|
28
|
+
|stopRemoteView:|停止远端拉流和渲染。|
|
|
29
|
+
|switchRemoteStream:streamType:|切换远端流的清晰度(高清/标清)。|
|
|
30
|
+
|muteRemoteAudio:mute:|静音/取消静音单路远端音频。|
|
|
31
|
+
|muteAllRemoteAudio:|静音/取消静音所有远端音频。|
|
|
32
|
+
|startLocalAudio|开始对讲(上行音频)。|
|
|
33
|
+
|stopLocalAudio|停止对讲。|
|
|
34
|
+
|muteLocalAudio:|静音本地音频。|
|
|
35
|
+
|startLocalVideo:videoEncoderParams:|开始本地视频采集和推送。|
|
|
36
|
+
|stopLocalVideo|停止本地视频采集和推送。|
|
|
37
|
+
|sendPTZCommand:command:speed:|发送云台控制指令。|
|
|
38
|
+
|takeSnapshot:|对当前正在观看的通道进行截图。|
|
|
39
|
+
|startLocalRecording:params:|开始对当前正在观看的通道进行录制。|
|
|
40
|
+
|stopLocalRecording:|停止录制。|
|
|
41
|
+
|
|
42
|
+
### addDelegate:
|
|
43
|
+
|
|
44
|
+
**添加监控事件代理**
|
|
45
|
+
|
|
46
|
+
|参数|描述|
|
|
47
|
+
|---------|---------|
|
|
48
|
+
|delegate|`id<TXIoTMonitorSessionDelegate>`;监控事件代理对象。|
|
|
49
|
+
|
|
50
|
+
### removeDelegate:
|
|
51
|
+
|
|
52
|
+
**移除监控事件代理**
|
|
53
|
+
|
|
54
|
+
|参数|描述|
|
|
55
|
+
|---------|---------|
|
|
56
|
+
|delegate|`id<TXIoTMonitorSessionDelegate>`;要移除的监控事件代理对象。|
|
|
57
|
+
|
|
58
|
+
### startSession:
|
|
59
|
+
|
|
60
|
+
**启动实时监控会话**
|
|
61
|
+
|
|
62
|
+
会话建立结果通过 `onSessionEstablished` 回调通知
|
|
63
|
+
|
|
64
|
+
|参数|描述|
|
|
65
|
+
|---------|---------|
|
|
66
|
+
|deviceId|TXIoTDeviceId*;要监控的设备 ID。|
|
|
67
|
+
|
|
68
|
+
### stopSession
|
|
69
|
+
|
|
70
|
+
**停止监控会话**
|
|
71
|
+
|
|
72
|
+
### startRemoteView:streamType:view:
|
|
73
|
+
|
|
74
|
+
**开始远端拉流渲染**
|
|
75
|
+
|
|
76
|
+
|参数|描述|
|
|
77
|
+
|---------|---------|
|
|
78
|
+
|channelId|`NSInteger`;通道 ID。|
|
|
79
|
+
|streamType|TXIoTStreamType;流类型:高清或标清。|
|
|
80
|
+
|view|`TXView*`;用于渲染远端视频的视图。|
|
|
81
|
+
|
|
82
|
+
### stopRemoteView:
|
|
83
|
+
|
|
84
|
+
**停止远端拉流渲染**
|
|
85
|
+
|
|
86
|
+
|参数|描述|
|
|
87
|
+
|---------|---------|
|
|
88
|
+
|channelId|`NSInteger`;通道 ID。|
|
|
89
|
+
|
|
90
|
+
### switchRemoteStream:streamType:
|
|
91
|
+
|
|
92
|
+
**切换远端流的清晰度(高清/标清)**
|
|
93
|
+
|
|
94
|
+
|参数|描述|
|
|
95
|
+
|---------|---------|
|
|
96
|
+
|channelId|`NSInteger`;通道 ID。|
|
|
97
|
+
|streamType|TXIoTStreamType;目标流的清晰度。|
|
|
98
|
+
|
|
99
|
+
### muteRemoteAudio:mute:
|
|
100
|
+
|
|
101
|
+
**静音/取消静音单路远端音频**
|
|
102
|
+
|
|
103
|
+
|参数|描述|
|
|
104
|
+
|---------|---------|
|
|
105
|
+
|channelId|`NSInteger`;通道 ID。|
|
|
106
|
+
|mute|`BOOL`;YES 静音,NO 取消静音。|
|
|
107
|
+
|
|
108
|
+
### muteAllRemoteAudio:
|
|
109
|
+
|
|
110
|
+
**静音/取消静音所有远端音频**
|
|
111
|
+
|
|
112
|
+
|参数|描述|
|
|
113
|
+
|---------|---------|
|
|
114
|
+
|mute|`BOOL`;YES 静音,NO 取消静音。|
|
|
115
|
+
|
|
116
|
+
### startLocalAudio
|
|
117
|
+
|
|
118
|
+
**开始对讲(上行音频)**
|
|
119
|
+
|
|
120
|
+
### stopLocalAudio
|
|
121
|
+
|
|
122
|
+
**停止对讲**
|
|
123
|
+
|
|
124
|
+
### muteLocalAudio:
|
|
125
|
+
|
|
126
|
+
**静音本地音频**
|
|
127
|
+
|
|
128
|
+
|参数|描述|
|
|
129
|
+
|---------|---------|
|
|
130
|
+
|mute|`BOOL`;YES 静音,NO 取消静音。|
|
|
131
|
+
|
|
132
|
+
### startLocalVideo:videoEncoderParams:
|
|
133
|
+
|
|
134
|
+
**开始本地视频采集和推送**
|
|
135
|
+
|
|
136
|
+
|参数|描述|
|
|
137
|
+
|---------|---------|
|
|
138
|
+
|view|`TXView*`;用于渲染本地视频的视图。|
|
|
139
|
+
|videoEncoderParams|TXIoTVideoEncoderParams*;视频编码参数。|
|
|
140
|
+
|
|
141
|
+
### stopLocalVideo
|
|
142
|
+
|
|
143
|
+
**停止本地视频采集和推送**
|
|
144
|
+
|
|
145
|
+
### sendPTZCommand:command:speed:
|
|
146
|
+
|
|
147
|
+
**发送云台控制指令**
|
|
148
|
+
|
|
149
|
+
|参数|描述|
|
|
150
|
+
|---------|---------|
|
|
151
|
+
|channelId|`NSInteger`;通道 ID。|
|
|
152
|
+
|command|TXIoTPTZCommand;云台指令。|
|
|
153
|
+
|speed|`NSInteger`;控制速度。|
|
|
154
|
+
|
|
155
|
+
### takeSnapshot:
|
|
156
|
+
|
|
157
|
+
**截图。**截图结果通过 `onSnapshotComplete` 回调通知
|
|
158
|
+
|
|
159
|
+
|参数|描述|
|
|
160
|
+
|---------|---------|
|
|
161
|
+
|channelId|`NSInteger`;通道 ID。|
|
|
162
|
+
|
|
163
|
+
### startLocalRecording:params:
|
|
164
|
+
|
|
165
|
+
**开始本地录制。**录制状态通过 Delegate 回调通知
|
|
166
|
+
|
|
167
|
+
|参数|描述|
|
|
168
|
+
|---------|---------|
|
|
169
|
+
|channelId|`NSInteger`;通道 ID。|
|
|
170
|
+
|params|TXIoTLocalRecordingParams*;录制参数,包含文件路径等。|
|
|
171
|
+
|
|
172
|
+
### stopLocalRecording:
|
|
173
|
+
|
|
174
|
+
**停止本地录制**
|
|
175
|
+
|
|
176
|
+
|参数|描述|
|
|
177
|
+
|---------|---------|
|
|
178
|
+
|channelId|`NSInteger`;通道 ID。|
|
|
179
|
+
|
|
180
|
+
## 监控事件回调
|
|
181
|
+
|
|
182
|
+
`TXIoTMonitorSessionDelegate` 协议定义监控事件回调,所有方法均为 `@optional`。
|
|
183
|
+
|
|
184
|
+
|回调|说明|
|
|
185
|
+
|---------|---------|
|
|
186
|
+
|onError:errorCode:errorMessage:|实时监控过程发生错误,错误码见 TXIoTErrorCode。|
|
|
187
|
+
|onSessionEstablished|实时监控会话建立成功。|
|
|
188
|
+
|onSessionReconnecting|实时监控会话重连中。|
|
|
189
|
+
|onSessionRecovery|实时监控会话恢复。|
|
|
190
|
+
|onRemoteStreamAvailable:available:|远端流可用性变化。|
|
|
191
|
+
|onRenderFirstFrame:|首帧渲染完成。|
|
|
192
|
+
|onPlayStateChanged:state:|播放状态变化。|
|
|
193
|
+
|onSnapshotComplete:image:errorCode:|截图完成。|
|
|
194
|
+
|onLocalRecordBegin:errorCode:storagePath:|本地录制开始。|
|
|
195
|
+
|onLocalRecording:durationMs:storagePath:|本地录制进行中。|
|
|
196
|
+
|onLocalRecordComplete:errorCode:storagePath:|本地录制完成。|
|
|
197
|
+
|
|
198
|
+
## 监控相关数据结构与枚举
|
|
199
|
+
|
|
200
|
+
### TXIoTVideoEncoderParams
|
|
201
|
+
|
|
202
|
+
|字段|说明|
|
|
203
|
+
|---------|---------|
|
|
204
|
+
|resolution|视频编码分辨率。|
|
|
205
|
+
|
|
206
|
+
### TXIoTLocalRecordingParams
|
|
207
|
+
|
|
208
|
+
|字段|说明|
|
|
209
|
+
|---------|---------|
|
|
210
|
+
|filePath|本地录制文件保存路径。|
|
|
211
|
+
|
|
212
|
+
### TXIoTStreamType
|
|
213
|
+
|
|
214
|
+
|枚举|取值|说明|
|
|
215
|
+
|---------|---------|---------|
|
|
216
|
+
|TXIoTStreamTypeHD|0|高清|
|
|
217
|
+
|TXIoTStreamTypeSD|1|标清|
|
|
218
|
+
|
|
219
|
+
### TXIoTPTZCommand
|
|
220
|
+
|
|
221
|
+
|枚举|取值|说明|
|
|
222
|
+
|---------|---------|---------|
|
|
223
|
+
|TXIoTPTZCommandUp|0|上|
|
|
224
|
+
|TXIoTPTZCommandDown|1|下|
|
|
225
|
+
|TXIoTPTZCommandLeft|2|左|
|
|
226
|
+
|TXIoTPTZCommandRight|3|右|
|
|
227
|
+
|TXIoTPTZCommandZoomIn|4|放大|
|
|
228
|
+
|TXIoTPTZCommandZoomOut|5|缩小|
|
|
229
|
+
|TXIoTPTZCommandStop|6|停止|
|
|
230
|
+
|
|
231
|
+
### TXIoTPlayState
|
|
232
|
+
|
|
233
|
+
|枚举|取值|说明|
|
|
234
|
+
|---------|---------|---------|
|
|
235
|
+
|TXIoTPlayStatePlaying|0|正在播放|
|
|
236
|
+
|TXIoTPlayStateLoading|1|加载中|
|
|
237
|
+
|TXIoTPlayStateStopped|2|已停止|
|
|
238
|
+
|
|
239
|
+
### TXIoTVideoResolution
|
|
240
|
+
|
|
241
|
+
|枚举|取值|说明|
|
|
242
|
+
|---------|---------|---------|
|
|
243
|
+
|TXIoTVideoResolution_640_360|0|横屏 640×360|
|
|
244
|
+
|TXIoTVideoResolution_960_540|1|横屏 960×540|
|
|
245
|
+
|TXIoTVideoResolution_1280_720|2|横屏 1280×720|
|
|
246
|
+
|TXIoTVideoResolution_1920_1080|3|横屏 1920×1080|
|
|
247
|
+
|TXIoTVideoResolution_360_640|4|竖屏 360×640|
|
|
248
|
+
|TXIoTVideoResolution_540_960|5|竖屏 540×960|
|
|
249
|
+
|TXIoTVideoResolution_720_1280|6|竖屏 720×1280|
|
|
250
|
+
|TXIoTVideoResolution_1080_1920|7|竖屏 1080×1920|
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
product: iot
|
|
3
|
+
framework:
|
|
4
|
+
- minprogram
|
|
5
|
+
types:
|
|
6
|
+
- api
|
|
7
|
+
retrievable_scope: always
|
|
8
|
+
feature_domain: client_api
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 概述
|
|
12
|
+
|
|
13
|
+
TXIoTCallSession 负责与设备之间的音视频通话,包括发起呼叫、挂断、远端画面渲染、麦克风/摄像头控制及音频输出设备选择。TXIoTCallSession 通过 TXIoTEngine.getCallSession 获取实例,需在登录成功后调用。
|
|
14
|
+
|
|
15
|
+
> **说明:**
|
|
16
|
+
> 回调模型:通话事件通过 `TXIoTCallListener` 接口回调,所有 Listener 回调在主线程触发,公共类型与错误码定义见 TXIoTEngineDef。
|
|
17
|
+
>
|
|
18
|
+
|
|
19
|
+
## 方法列表
|
|
20
|
+
|
|
21
|
+
|方法签名|描述|
|
|
22
|
+
|---------|---------|
|
|
23
|
+
|addListener|添加通话事件监听器。|
|
|
24
|
+
|removeListener|移除通话事件监听器。|
|
|
25
|
+
|setIoTPlayer|绑定 iot-player 渲染组件。|
|
|
26
|
+
|callDevice|向设备发起通话(音频/视频)。|
|
|
27
|
+
|hangup|挂断当前通话。|
|
|
28
|
+
|startRemoteView|开始渲染远端视频。|
|
|
29
|
+
|stopRemoteView|停止渲染远端视频。|
|
|
30
|
+
|openMicrophone|打开麦克风。|
|
|
31
|
+
|closeMicrophone|关闭麦克风。|
|
|
32
|
+
|openCamera|打开摄像头并设置本地预览视图。|
|
|
33
|
+
|closeCamera|关闭摄像头。|
|
|
34
|
+
|switchCamera|切换摄像头(前后置)。|
|
|
35
|
+
|selectAudioPlaybackDevice|选择音频播放设备(扬声器/听筒)。|
|
|
36
|
+
|
|
37
|
+
### addListener
|
|
38
|
+
|
|
39
|
+
**添加通话事件监听器**
|
|
40
|
+
|
|
41
|
+
|参数|描述|
|
|
42
|
+
|---------|---------|
|
|
43
|
+
|listener|`TXIoTCallListener`;监听器实例。|
|
|
44
|
+
|
|
45
|
+
### removeListener
|
|
46
|
+
|
|
47
|
+
**移除通话事件监听器**
|
|
48
|
+
|
|
49
|
+
|参数|描述|
|
|
50
|
+
|---------|---------|
|
|
51
|
+
|listener|`TXIoTCallListener`;监听器实例。|
|
|
52
|
+
|
|
53
|
+
### setIoTPlayer
|
|
54
|
+
|
|
55
|
+
**绑定渲染组件**
|
|
56
|
+
|
|
57
|
+
把某个远端用户与其对应的 `iot-player` 组件绑定,SDK 会在该组件上渲染远端用户的音视频。音频通话没有视频画面时也需要绑定组件,音频通过该组件播放。
|
|
58
|
+
|
|
59
|
+
|参数|描述|
|
|
60
|
+
|---------|---------|
|
|
61
|
+
|callUser|TXIoTCallUser;参与通话的用户。|
|
|
62
|
+
|iotPlayerComponentId|`String`;`iot-player` 组件的 componentId。|
|
|
63
|
+
|
|
64
|
+
### callDevice
|
|
65
|
+
|
|
66
|
+
**向设备发起通话(音频/视频)**
|
|
67
|
+
|
|
68
|
+
|参数|描述|
|
|
69
|
+
|---------|---------|
|
|
70
|
+
|deviceId|TXIoTDeviceId;设备标识(含 productId / deviceName)。|
|
|
71
|
+
|callType|TXIoTCallMediaType;通话类型(音频/视频)。|
|
|
72
|
+
|
|
73
|
+
### hangup
|
|
74
|
+
|
|
75
|
+
**挂断当前进行中的通话**
|
|
76
|
+
|
|
77
|
+
### startRemoteView
|
|
78
|
+
|
|
79
|
+
**开始渲染远端视频**
|
|
80
|
+
|
|
81
|
+
|参数|描述|
|
|
82
|
+
|---------|---------|
|
|
83
|
+
|callUser|TXIoTCallUser;参与通话的用户。|
|
|
84
|
+
|
|
85
|
+
### stopRemoteView
|
|
86
|
+
|
|
87
|
+
**停止渲染远端视频**
|
|
88
|
+
|
|
89
|
+
|参数|描述|
|
|
90
|
+
|---------|---------|
|
|
91
|
+
|callUser|TXIoTCallUser;参与通话的用户。|
|
|
92
|
+
|
|
93
|
+
### openMicrophone
|
|
94
|
+
|
|
95
|
+
**打开麦克风**
|
|
96
|
+
|
|
97
|
+
### closeMicrophone
|
|
98
|
+
|
|
99
|
+
**关闭麦克风**
|
|
100
|
+
|
|
101
|
+
### openCamera
|
|
102
|
+
|
|
103
|
+
**打开摄像头并设置本地预览视图**
|
|
104
|
+
|
|
105
|
+
|参数|描述|
|
|
106
|
+
|---------|---------|
|
|
107
|
+
|camera|TXIoTCamera;摄像头(前置/后置)。|
|
|
108
|
+
|
|
109
|
+
### closeCamera
|
|
110
|
+
|
|
111
|
+
**关闭摄像头**
|
|
112
|
+
|
|
113
|
+
### switchCamera
|
|
114
|
+
|
|
115
|
+
**切换摄像头(前后置)**
|
|
116
|
+
|
|
117
|
+
|参数|描述|
|
|
118
|
+
|---------|---------|
|
|
119
|
+
|camera|TXIoTCamera;摄像头(前置/后置)。|
|
|
120
|
+
|
|
121
|
+
### selectAudioPlaybackDevice
|
|
122
|
+
|
|
123
|
+
**选择音频播放设备(扬声器/听筒)**
|
|
124
|
+
|
|
125
|
+
|参数|描述|
|
|
126
|
+
|---------|---------|
|
|
127
|
+
|device|TXIoTAudioPlaybackDevice;音频播放设备(扬声器/听筒)。|
|
|
128
|
+
|
|
129
|
+
## 通话事件回调
|
|
130
|
+
|
|
131
|
+
|回调方法|说明|
|
|
132
|
+
|---------|---------|
|
|
133
|
+
|`onError(code: Number, msg: String)`|通话发生错误。|
|
|
134
|
+
|`onCallBegin(mediaType: Number)`|通话开始。类型为 TXIoTCallMediaType。|
|
|
135
|
+
|`onCallEnd(mediaType: Number, reason: Number)`|通话结束,携带结束原因。原因类型为 TXIoTCallEndReason。|
|
|
136
|
+
|`onCallRejected(callUser: TXIoTCallUser)`|通话被对方拒接。|
|
|
137
|
+
|`onCallNoResponse(callUser: TXIoTCallUser)`|对方无应答。|
|
|
138
|
+
|`onCallLineBusy(callUser: TXIoTCallUser)`|对方占线。|
|
|
139
|
+
|`onCallUserOffline(callUser: TXIoTCallUser)`|对方离线。|
|
|
140
|
+
|`onCallUserAudioAvailable(callUser: TXIoTCallUser, available: boolean)`|远端用户音频状态发生变化。|
|
|
141
|
+
|`onCallUserVideoAvailable(callUser: TXIoTCallUser, available: boolean)`|远端用户视频状态发生变化。|
|
|
142
|
+
|
|
143
|
+
## 通话相关数据结构与枚举
|
|
144
|
+
|
|
145
|
+
### TXIoTCallMediaType
|
|
146
|
+
|
|
147
|
+
|枚举|说明|
|
|
148
|
+
|---------|---------|
|
|
149
|
+
|AUDIO|音频通话。|
|
|
150
|
+
|VIDEO|视频通话。|
|
|
151
|
+
|
|
152
|
+
### TXIoTCallEndReason
|
|
153
|
+
|
|
154
|
+
|枚举|说明|
|
|
155
|
+
|---------|---------|
|
|
156
|
+
|UNKNOWN|未知原因。|
|
|
157
|
+
|LOCAL_HANGUP|本地挂断。|
|
|
158
|
+
|REMOTE_HANGUP|远端挂断。|
|
|
159
|
+
|CALL_PERMISSION_DENIED|呼叫权限被拒绝。|
|
|
160
|
+
|NETWORK_ERROR|网络错误。|
|
|
161
|
+
|
|
162
|
+
### TXIoTAudioPlaybackDevice
|
|
163
|
+
|
|
164
|
+
|枚举|说明|
|
|
165
|
+
|---------|---------|
|
|
166
|
+
|SPEAKERPHONE|扬声器(外放)。|
|
|
167
|
+
|EARPIECE|听筒。|
|
|
168
|
+
|
|
169
|
+
### TXIoTCamera
|
|
170
|
+
|
|
171
|
+
|枚举|说明|
|
|
172
|
+
|---------|---------|
|
|
173
|
+
|FRONT|前置摄像头。|
|
|
174
|
+
|BACK|后置摄像头。|
|
|
175
|
+
|
|
176
|
+
### TXIoTCallUser
|
|
177
|
+
|
|
178
|
+
|字段|说明|
|
|
179
|
+
|---------|---------|
|
|
180
|
+
|deviceId|参与通话的设备 ID。|
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
product: iot
|
|
3
|
+
framework:
|
|
4
|
+
- minprogram
|
|
5
|
+
types:
|
|
6
|
+
- api
|
|
7
|
+
retrievable_scope: always
|
|
8
|
+
feature_domain: client_api
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 概述
|
|
12
|
+
|
|
13
|
+
`TXIoTCloudStorage` 是云存功能模块,通过 `TXIoTEngine.getCloudStorage(deviceId)` 获取,提供设备云端录像的日期列表与事件列表查询能力。
|
|
14
|
+
|
|
15
|
+
> **说明:**
|
|
16
|
+
> 云存模块与设备一一对应,每次调用 `getCloudStorage` 都会返回一个与 `deviceId` 绑定的新实例,不做缓存;未登录或初始化未完成时返回 `null`。所有异步方法均返回 Promise:成功 resolve 具体数据,失败 reject `{ code, message }`,其中 `code` 取值见 `TXIoTErrorCode`
|
|
17
|
+
>
|
|
18
|
+
|
|
19
|
+
## 方法列表
|
|
20
|
+
|
|
21
|
+
|方法签名|描述|
|
|
22
|
+
|---------|---------|
|
|
23
|
+
|getDayList|查询指定通道有云端录像的日期列表。|
|
|
24
|
+
|getEventList|分页查询指定日期的云存事件列表。|
|
|
25
|
+
|
|
26
|
+
### getDayList
|
|
27
|
+
|
|
28
|
+
**查询有云端录像的日期列表**
|
|
29
|
+
|
|
30
|
+
|参数|描述|
|
|
31
|
+
|---------|---------|
|
|
32
|
+
|channelId|`int`;通道 ID,从 0 开始计数;单通道设备填 0。|
|
|
33
|
+
|timeZoneId|`String`;按天统计录像所用的 IANA 时区 ID,例如 `Asia/Shanghai`。|
|
|
34
|
+
|
|
35
|
+
|返回值|描述|
|
|
36
|
+
|---------|---------|
|
|
37
|
+
|`Promise<List<String>>`|有云端录像的日期字符串列表,格式为 `YYYY-MM-DD`(如`2026-08-20`)|
|
|
38
|
+
|
|
39
|
+
### getEventList
|
|
40
|
+
|
|
41
|
+
**分页查询指定日期的云存事件列表**
|
|
42
|
+
|
|
43
|
+
|参数|描述|
|
|
44
|
+
|---------|---------|
|
|
45
|
+
|channelId|`int`;通道 ID,从 0 开始计数;单通道设备填 0。|
|
|
46
|
+
|timeZoneId|`String`;按天统计事件所用的 IANA 时区 ID,例如 `Asia/Shanghai`。|
|
|
47
|
+
|date|`String`;要查询的日期,格式为 `YYYY-MM-DD`(如`2026-08-20`),通常取自 `getDayList` 的返回结果。|
|
|
48
|
+
|nextPageToken|`String`;分页游标。首次查询传空字符串 `''`;翻页时传入上一次返回结果中的 `nextPageToken`。|
|
|
49
|
+
|
|
50
|
+
|返回值|描述|
|
|
51
|
+
|---------|---------|
|
|
52
|
+
|Promise<TXIoTPageResult<TXIoTEvent>>|resolve 分页结果,`list` 为本页事件列表(元素类型为 `TXIoTEvent`),`nextPageToken` 为空字符串表示已经是最后一页;reject `{ code, message }`。|
|
|
53
|
+
|
|
54
|
+
## 云存相关数据结构
|
|
55
|
+
|
|
56
|
+
### TXIoTEvent
|
|
57
|
+
|
|
58
|
+
**云存事件,包含事件类型、缩略图、发生时间及关联录像文件**
|
|
59
|
+
|
|
60
|
+
|字段|说明|
|
|
61
|
+
|---------|---------|
|
|
62
|
+
|eventType|事件类型标识,可能为空字符串,调用方可按需过滤。|
|
|
63
|
+
|thumbnailUrl|事件缩略图 URL。|
|
|
64
|
+
|eventTimeMs|事件发生时间,Unix 毫秒级时间戳。|
|
|
65
|
+
|durationMs|事件时长,单位毫秒。|
|
|
66
|
+
|videoFiles|事件关联的录像文件列表,元素类型为 TXIoTVideoFile。|
|
|
67
|
+
|
|
68
|
+
### TXIoTVideoFile
|
|
69
|
+
|
|
70
|
+
**云存录像文件,包含播放地址与时间信息**
|
|
71
|
+
|
|
72
|
+
|字段|说明|
|
|
73
|
+
|---------|---------|
|
|
74
|
+
|videoUrl|录像播放地址,为 HLS(m3u8)地址。|
|
|
75
|
+
|startTimeMs|录像片段起始时间,Unix 毫秒级时间戳。|
|
|
76
|
+
|durationMs|录像片段时长,单位毫秒。|
|