publishScreen abstract method
Publishes local screen sharing streams 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 screen sharing streams. Call RTCRoom.setUserVisibility to change your visibility.
- After you called this API, the other users in the room will receive RTCRoomEventHandler.onUserPublishScreen. Those who successfully received your streams will receive RTCVideoEventHandler.onFirstRemoteAudioFrame/RTCVideoEventHandler.onFirstRemoteVideoFrameDecoded.
- After calling this API, you will receive RTCVideoEventHandler.onScreenVideoFrameSendStateChanged.
- Call RTCRoom.startForwardStreamToRooms to relay the published streams to the other rooms.
- Call RTCRoom.unpublishScreen to stop publishing screen sharing streams.
Implementation
Future<int?> publishScreen(MediaStreamType type);