Cloud live from an AppId
Cloud live from an AppId
Scope and prerequisites
No single API covers every player. Use getKitToken with ImouPlayer when the page needs preview, talk, and PTZ. Call bindDeviceLive for an HLS address. Call createDeviceRtmpLive for RTMP. All three start with an accessToken from your server.
The device must already be bound. See Integrate a camera.
Steps
- Create an app and store the
AppIdandAppSecret. See Create an app. - Bind one camera you can check on site.
- Call accessToken from the server. This token is not a player credential.
- Call Paged device detail and confirm the camera is in the list.
- Mint the credential for the player you actually use:
- Interactive web:
getKitToken, and give the page only thekitToken. See Integrate on the web. - HLS: bindDeviceLive.
streamId0is HD and1is SD. Treat the URL as sensitive. Anyone who has it can view the video. - RTMP: createDeviceRtmpLive. It does not replace ImouPlayer controls.
Prove one camera before you build a wall. Addresses expire. Create them again when you need a new one. Query and delete are in Device live.
Where each credential lives
| Credential | Where it lives | Role |
|---|---|---|
AppSecret | Server or a secrets manager only | Proves the developer app |
accessToken | Server cache only | Authenticates OpenAPI calls |
kitToken | Returned to the browser after ACL | ImouPlayer credential, about 2 hours; cache about 1 hour |
| HLS / RTMP URL | Returned to the client after ACL | Treat it as a shareable secret and create a new one when it expires |
Do not pass accessToken to ImouPlayer. The player expects kitToken.
Client implementations
Cloud live sends H.264 and AAC. Limits are in Cloud live.
