Skip to main content

Third-party CDN

Configure Live CDN URLs

RC's live streaming supports relaying to third-party CDN services.

Developers first need to join a room as a host, then after successfully publishing resources, relay to third-party CDNs via the addLiveCdn method in RCRTCEngine.
Requirements for setting CDN URLs:

  1. RTC and live streaming services must be activated.
  2. The room must be in live mode.
  3. CDN URLs cannot be empty.
  4. Maximum 5 CDN URLs can be configured. Exceeding this limit triggers error 50080 (CDN URL limit reached).
  5. Repeatedly setting the same URL returns success directly.
  • Sample code:

    engine.addLiveCdn(url);

Remove Configured Live CDN URLs

After a host successfully publishes resources, they may remove a previously configured CDN URL. Requirements:

  1. RTC and live streaming services must be activated.
  2. The room must be in live mode.
  3. The URL to be removed cannot be empty.
  4. Removing a non-configured URL returns success directly.
  • Sample code:

    engine.removeLiveCdn(url);