stopPublishMediaStream abstract method
Stop publishing
You can use this API to stop a task initiated by startPublishMediaStream.
Parameters:
- taskId(String):
- The task ID returned to you via the TRTCCloudListener.onStartPublishMediaStream callback.
Note
If the task ID is not saved to your backend, you can call startPublishMediaStream again when an anchor re-enters the room after abnormal exit. The publishing will fail, but the TRTC backend will return the task ID to you.
If
taskId
is left empty, the TRTC backend will end all tasks you started through startPublishMediaStream. You can leave it empty if you have started only one task or want to stop all publishing tasks started by you.
Implementation
void stopPublishMediaStream(String taskId);