addPublishStreamUrl abstract method

  1. @Deprecated('This method is deprecated.')
Future<void> addPublishStreamUrl(
  1. String url,
  2. bool transcodingEnabled
)

Publishes the local stream to a specified CDN live streaming URL. Deprecated: This method is deprecated. See Release Notes for an alternative solution. This method is deprecated. After calling this method, you can push media streams in RTMP or RTMPS protocol to the CDN. The SDK triggers the rtmpStreamingStateChanged callback on the local client to report the state of adding a local stream to the CDN. Call this method after joining a channel. Ensure that the media push function is enabled. This method takes effect only when you are a host in live interactive streaming. This method adds only one streaming URL to the CDN each time it is called. To push multiple URLs, call this method multiple times. Agora only supports pushing media streams to the CDN in RTMPS protocol when you enable transcoding.

Param url The media push URL in the RTMP or RTMPS format. The maximum length of this parameter is 1024 bytes. The URL address must not contain special characters, such as Chinese language characters.

Param transcodingEnabled Whether to enable transcoding. Transcoding in a CDN live streaming converts the audio and video streams before pushing them to the CDN server. It applies to scenarios where a channel has multiple broadcasters and composite layout is needed. true: Enable transcoding. false: Disable transcoding. If you set this parameter as true, ensure that you call the setLiveTranscoding method before calling this method.

Implementation

@Deprecated('This method is deprecated.')
Future<void> addPublishStreamUrl(String url, bool transcodingEnabled);