Can I use Cloud Live instead of the Imou OpenSDK?
Description and use
Maintaining both Cloud Live and OpenSDK with a unified gateway prevents feature drift, ensures consistent capability checks, and allows clear documentation of surface-specific features.
Problem
Deciding whether to replace Imou OpenSDK with Cloud Live for live video delivery across web and native platforms.
Outcome
Maintaining both Cloud Live and OpenSDK with a unified gateway prevents feature drift, ensures consistent capability checks, and allows clear documentation of surface-specific features.
Workflow
- 1. Implement a cameraGateway with list, openLive, and can methods.
- 2. In openLive, route to cloudLive.open for web surfaces and nativeSession.open for native surfaces.
- 3. Use can() to cache capabilities and hide talk/PTZ on web if not allowed.
- 4. Ship web-only product: inventory + HTTPS live tile, error handling, capability checks, teardown on leave.
- 5. Ship native-only product: inventory, OpenSDK live, teardown on pause, talk after can('talk') and mic permission.
- 6. Ship both surfaces: add surface metric, revoke by invalidating both handles, avoid assuming web flags for native.
- 7. Generate camera rows in one place, store external_id, avoid silent copying.
- 8. Add contract tests to ensure both adapters return same camera_id and handle new fields uniformly.
- 9. Document surfaces and not-in-this-leaf list in README.
- 10. Use separate teardown functions for web and native to avoid leaks.
- 11. Run automated tests: revoke, mixed content, pause, capability checks.
- 12. Decide deployment based on product needs: web-only, native-only, or both.
Evidence
I use a cloud live address and a JS player on the website, H5 page, and SaaS console. I use OpenSDK in the native app when I need an app shell, live, and talk on that OS—if the device and subscribed services allow those verbs.
I do not let those clients import vendor SDKs into domain code.
I add a contract test: list from the BFF, open web, open native (mocked), same camera_id. If a new field appears on only one adapter, the test fails.
- Record date: 2026-09-22T05:15:55.886Z