Get started
  • English
  • 简体中文
Official Site
Get started
  • English
  • 简体中文
Official Site
  • Get started
  • Concepts
  • Guides
    • Account and authorization
    • Device access
    • Audio and video
      • Cloud live from an AppId
      • Integrate the light application
      • Build a mobile app
      • Build a desktop app
      • Video playback
      • Troubleshoot preview
    • Device capability integration
    • Receive device messages
    • Manage cloud storage
    • Release and operations
  • Device capabilities & events
  • API reference
  • SDK and tools
  • Solutions
  • Platform and support
On this page
Scope and prerequisites
Steps
Where each credential lives
Client implementations
Related reference

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

  1. Create an app and store the AppId and AppSecret. See Create an app.
  2. Bind one camera you can check on site.
  3. Call accessToken from the server. This token is not a player credential.
  4. Call Paged device detail and confirm the camera is in the list.
  5. Mint the credential for the player you actually use:
  • Interactive web: getKitToken, and give the page only the kitToken. See Integrate on the web.
  • HLS: bindDeviceLive. streamId 0 is HD and 1 is 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

CredentialWhere it livesRole
AppSecretServer or a secrets manager onlyProves the developer app
accessTokenServer cache onlyAuthenticates OpenAPI calls
kitTokenReturned to the browser after ACLImouPlayer credential, about 2 hours; cache about 1 hour
HLS / RTMP URLReturned to the client after ACLTreat 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.

Related reference

  • Device live
  • Integrate on the web
Troubleshoot bind and offline
Integrate the light application