FishjamClient

class FishjamClient(appContext: Context, listener: FishjamClientListener)

Constructors

Link copied to clipboard
constructor(appContext: Context, listener: FishjamClientListener)

Functions

Link copied to clipboard
fun changeWebRTCLoggingSeverity(severity: Logging.Severity)

Changes severity level of debug logs

Link copied to clipboard
fun cleanUp()

Disconnect from the room, and close the websocket connection. Tries to leave the room gracefully, but if it fails, it will close the websocket anyway.

Link copied to clipboard
fun connect(config: Config)

Connects to the server using the WebSocket connection

Link copied to clipboard

Creates an audio track utilizing device's microphone.

Link copied to clipboard
fun createScreencastTrack(mediaProjectionPermission: Intent, videoParameters: VideoParameters, metadata: Metadata, onEnd: () -> Unit? = null): LocalScreencastTrack

Creates a screen track recording the entire device's screen.

Link copied to clipboard
fun createVideoTrack(videoParameters: VideoParameters, metadata: Metadata, captureDeviceName: String? = null): LocalVideoTrack

Creates a video track utilizing device's camera.

Link copied to clipboard
fun disableTrackEncoding(trackId: String, encoding: TrackEncoding)

Disables track encoding so that it will be no longer sent to the server.

Link copied to clipboard
fun enableTrackEncoding(trackId: String, encoding: TrackEncoding)

Enables track encoding so that it will be sent to the server.

Link copied to clipboard

Returns current connection stats

Link copied to clipboard
fun join(peerMetadata: Metadata = emptyMap())

Tries to join the room. If user is accepted then {@link FishjamClient.onConnected} will be called. In other case {@link FishjamClient.onConnectError} is invoked.

Link copied to clipboard
fun leave()

Leaves the room. This function should be called when user leaves the room in a clean way e.g. by clicking a dedicated, custom button disconnect. As a result there will be generated one more media event that should be sent to the RTC Engine. Thanks to it each other peer will be notified that peer left in {@link MessageEvents.onPeerLeft},

Link copied to clipboard
fun removeTrack(trackId: String): Boolean

Removes an instance of local track from the client.

Link copied to clipboard
fun setEncodingBandwidth(trackId: String, encoding: String, bandwidthLimit: TrackBandwidthLimit.BandwidthLimit)

Updates maximum bandwidth for the given simulcast encoding of the given track.

Link copied to clipboard

Sets track encoding that server should send to the client library.

Link copied to clipboard

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.

Link copied to clipboard
fun updatePeerMetadata(peerMetadata: Metadata)

Updates the metadata for the local peer.

Link copied to clipboard
fun updateTrackMetadata(trackId: String, trackMetadata: Metadata)

Updates the metadata for a specific track.