2020 API AWARDS WINNER - BEST IN MEDIA APIs LEARN MORE

ParticipantMediaStreamHandler

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

It 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

Cleans the given Participant's streams.

Returns: @NonNull Participant - the Participant instance

remove

remove(@NonNull mediaStream: MediaStream): boolean

Removes the given mediaStream from the Participant list.

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 given mediaStream type from the Participant list.

Parameters

NameTypeDescription
typeMediaStreamTypenon null type of MediaStream to erase from the streams

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