publishStream abstract method
Publishes media streams captured by camera/microphone in the current room.
type
: Media stream type.
Return value:
0
: Success.<0
: Failure. See ReturnStatus for the reason.
Notes:
- You don't need to call this API if you have selected Auto-publish when calling RTCRoom.joinRoom.
- An invisible user cannot publish media streams. Call RTCRoom.setUserVisibility to change your visibility.
- Call RTCRoom.publishScreen to start screen sharing.
- Call RTCRoom.startForwardStreamToRooms to relay the published streams to the other rooms.
- After you call this API, the other users in the room will receive RTCRoomEventHandler.onUserPublishStream. Those who successfully received your streams will receive RTCVideoEventHandler.onFirstRemoteAudioFrame/RTCVideoEventHandler.onFirstRemoteVideoFrameDecoded.
- Call RTCRoom.unpublishStream to stop publishing streams.
Implementation
Future<int?> publishStream(MediaStreamType type);