ParticipantMediaStreamHandler

The ParticipantMediaStreamHandler model manages media streams for the specific conference participants. It checks the type of the streams, gets first streams, inserts or updates the streams, removes the specific stream or all streams from participants.

This model assumes that the RestParticipant.streams method resolves references for RestParticipant streams.

Available in the package com.voxeet.sdk.models.v2.ParticipantMediaStreamHandler.

Methods

has

has(@NonNull type: MediaStreamType): boolean

Checks if a specific MediaStream Type exists in the current participant lifecycle.

Parameters

NameTypeDescription
typeMediaStreamTypenon null type of MediaStream

Returns: boolean - the search result.


getFirst

getFirst(@NonNull type: MediaStreamType): MediaStream

Gets the first MediaStream corresponding to the given type.

Parameters

NameTypeDescription
typeMediaStreamTypenon null type of MediaStream

Returns: @Nullable MediaStream - the MediaStream instance or a null value.


insertOrUpdate

insertOrUpdate(@NonNull mediaStream: MediaStream): Participant

Inserts or updates a stream and manages this process.

Parameters

NameTypeDescription
mediaStreamMediaStreamnon null MediaStream

Returns: @NonNull Participant - the participant's instance.


removeAllStreams

removeAllStreams(): Participant

Removes streams from the specific participant.

Returns: @NonNull Participant - the Participant instance


remove

remove(@NonNull mediaStream: MediaStream): boolean

Removes the specific mediaStream from participants.

Parameters

NameTypeDescription
mediaStreamMediaStreamnon null MediaStream for removal

Returns: @NonNull boolean - the result of the erasure in the list.


remove

remove(@NonNull type: MediaStreamType): boolean

Removes the specific mediaStream from participants.

Parameters

NameTypeDescription
typeMediaStreamTypenon null type of MediaStream to erase from the streams

Returns: @NonNull boolean - if a given stream type was removed.