使用手冊

生命週期與錯誤

一致處理 client ownership、async execution、retry、cancellation 與 shutdown。

Ownership 與 error

在 application service boundary 建立 client,不要每個 request 建立一次。Device session 屬於單一 client 且不可比它存活更久。Disconnect 必須容忍 partial connection;重複 shutdown 不應 double-free 或發出兩次 terminal event。

所有 package 都區分 invalid argument/state、timeout、authentication、transport、protocol、unsupported capability、platform failure、cancellation、memory exhaustion 與 internal failure。Application telemetry 應保留 stable SDK category;raw HTTP body 只作診斷 context。

Retry、cancel 與 callback

只 retry 明確 idempotent 或可安全重複的 operation,對暫時 transport failure、429 或 5xx 使用 bounded exponential backoff with jitter。未有 idempotency 保證時,不可自動重試 upload authorization、clip delete、device activation 或 command。

將 Kotlin coroutine、Swift Task、Go context、JavaScript AbortSignal 與 native callback 的 cancellation 傳到底層。Cancellation 不等於 upload success,應先查 upload state。Callback payload 若無另行說明,只在 callback 期間有效;UI update 必須切回 platform main thread。

其他手冊章節

繼續閱讀相關手冊章節。

SDK 總覽

選擇 package 並理解支援邊界。

開啟章節

開始使用

安裝 SDK、設定 client 並完成第一次 request。

開啟章節

認證與安全

安全處理 token、PKI、TLS、key 與 media。

開啟章節

能力工作流

整合 provisioning、device、telemetry、OTA、command 與 signaling。

開啟章節

Video Cloud 工作流

整合 Live WebRTC signaling 與 encrypted stored video。

開啟章節

Native C/C++ SDK

使用 stable C ABI、C++ wrapper、transport 與 streaming upload。

開啟章節

Android Kotlin SDK

使用 coroutine、signaling、Media3 與 secure key provider。

開啟章節

iOS Swift SDK

使用 async API、signaling、AVPlayer、Keychain 與 Secure Enclave。

開啟章節

JavaScript/TypeScript SDK

在 browser 與 Node.js 整合 typed ESM package。

開啟章節

Go SDK

用 pure Go client 整合 device、tool 與 automation。

開啟章節

FreeRTOS/Pro2 SDK

整合 board、transport、media 與 WebRTC answerer adapter。

開啟章節

Sample applications

正確使用 Android、iOS、Web、Linux 與 Pro2 sample。

開啟章節

除錯與相容性

診斷認證、transport、upload、playback 與版本問題。

開啟章節