onStartPublishMediaStream property

(void Function(String taskId, int errCode, String errMsg, String extraInfo)?) onStartPublishMediaStream
final

Callback for Starting to Publish

When you call startPublishMediaStream to publish a stream to the TRTC backend, the SDK will immediately update the command to the cloud server.

The SDK will then receive the publishing result from the cloud server and will send the result to you via this callback.

  • Parameters:
    • code(int):
      • 0: Successful; other values: Failed.
    • extraInfo(String):
      • Additional information. For some error codes, there may be additional information to help you troubleshoot the issues.
    • message(String):
      • The callback information.
    • taskId(String):
      • If a request is successful, a task ID will be returned via the callback. You need to provide this task ID when you call updatePublishMediaStream to modify publishing parameters or stopPublishMediaStream to stop publishing.

Implementation

final void Function(String taskId, int errCode, String errMsg, String extraInfo)? onStartPublishMediaStream;