Membrane RTC
MembraneRTC client.
The client is responsible for relaying MembraneRTC Engine specific messages through given reliable transport layer. Once initialized, the client is responsible for exchanging necessary messages via provided EventTransport passed via `ConnectOptions` and managing underlying `EndpointConnection`. The goal of the client is to be as lean as possible, meaning that all activities regarding the session such as moderating should be implemented by the user himself on top of the MembraneRTC.
The user's ability of interacting with the client is greatly limited to the essential actions such as connecting to/leaving the session, adding/removing local tracks and receiving information about remote endpoints and their tracks that can be played by the user.
User can request 3 different types of local tracks that will get forwarded to the server by the client:
- `LocalAudioTrack` - an audio track utilizing device's microphone
- `LocalVideoTrack` - a video track that can utilize device's camera or if necessary use video playback from a file (useful for testing with a simulator)
- `LocalScreencast` - a screencast track capturing a device's screen using
MediaProjection mechanism
It is recommended to request necessary audio and video tracks before connecting to the room but it does not mean it can't be done afterwards (in case of screencast)
Once the user created MembraneRTC client, they can call the connect method to initialize connecting to the session. After receiving `onConnected` a user will receive notification about various endpoints connecting to/leaving the session, new tracks being published and ready for playback or going inactive.
Functions
Changes severity level of debug logs
Creates an audio track utilizing device's microphone.
Creates a screen track recording the entire device's screen.
Creates a video track utilizing device's camera.
Disables track encoding so that it will be no longer sent to the server.
Disconnects the client.
Enables track encoding so that it will be sent to the server.
Feeds media event received from RTC Engine to MembraneWebRTC. This function should be called whenever some media event from RTC Engine was received and can result in MembraneWebRTC generating some other media events.
Removes an instance of local track from the client.
Updates maximum bandwidth for the given simulcast encoding of the given track.
Sets track encoding that server should send to the client library.
Updates maximum bandwidth for the track identified by trackId. This value directly translates to quality of the stream and, in case of video, to the amount of RTP packets being sent. In case trackId points at the simulcast track bandwidth is split between all of the variant streams proportionally to their resolution.
Updates the metadata for the current endpoint.
Updates the metadata for a specific track.