removePublishCdnUrl method

Future<ZegoPublisherUpdateCdnUrlResult> removePublishCdnUrl(
  1. String streamID,
  2. String targetURL
)

Deletes the specified CDN URL, which is used for relaying streams from ZEGO RTC server to CDN.

Available since: 1.1.0 Description: When a CDN forwarding address has been added via addPublishCdnUrl, this function is called when the stream needs to be stopped. When to call: After calling the createEngine function to create the engine, When you don't need to continue publish to the CDN. Restrictions: When the enablePublishDirectToCDN function is set to true to publish the stream straight to the CDN, then calling this function will have no effect. Caution: This function does not stop publishing audio and video stream to the ZEGO ZEGO RTC server. Related APIs: Add URLs that are re-pushed to the CDN addPublishCdnUrl.

  • streamID Stream ID.
  • targetURL CDN relay address, supported address format rtmp.
  • Returns The execution result of update the relay CDN operation.

Implementation

Future<ZegoPublisherUpdateCdnUrlResult> removePublishCdnUrl(
    String streamID, String targetURL) async {
  return await ZegoExpressImpl.instance
      .removePublishCdnUrl(streamID, targetURL);
}