startPushSingleStream method
@hidden(Linux)
@valid since 3.60.
@detail api
@hiddensdk(audiosdk)
@brief Pushes a single media stream to CDN or RTC room.
@param taskId Task ID.
You may want to start more than one task to push streams to CDN. When you do that, use different IDs for corresponding tasks; if you will start only one task, use an empty string.
@param param Configurations for pushing a single stream to CDN. See PushSingleStreamParam{@link #PushSingleStreamParam}.
@return
- 0: Success.
- < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details.
@note
- After calling this API, you will be informed of the result and errors during the pushing process with onSingleStreamEvent{@link #IRTCEngineEventHandler#onSingleStreamEvent}.
- Subscribe to the Push-to-CDN and the WTN stream notifications in the console to receive notifications about task status changes. When calling this API repeatedly, subsequent calls to this API will trigger both TranscodeStarted and TranscodeUpdated callbacks.
- Call stopPushSingleStream{@link #RTCEngine#stopPushSingleStream} to stop the task.
- Since this API does not perform encoding and decoding, the video stream pushed to RTMP will change according to the resolution, encoding method, and turning off the camera of the end of pushing streams.
Implementation
FutureOr<int> startPushSingleStream(
String taskId, PushSingleStreamParam param) async {
return await nativeCall('startPushSingleStream', [taskId, param]);
}