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:
- RTC and live streaming services must be activated.
- The room must be in live mode.
- CDN URLs cannot be empty.
- Maximum 5 CDN URLs can be configured. Exceeding this limit triggers error
50080
(CDN URL limit reached). - 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:
- RTC and live streaming services must be activated.
- The room must be in live mode.
- The URL to be removed cannot be empty.
- Removing a non-configured URL returns success directly.
-
Sample code:
engine.removeLiveCdn(url);