MediaStream

public abstract class MediaStream : IDisposable

Base stream

Properties

NameTypeDescription
IdUInt16Media id
MediaConfigOdinMediaConfigAudio config
CancellationSourceCancellationTokenSourceControl of async read and write tasks
IsMutedBooleanDetermine to send and/or read data
IsActiveBooleanDetermine if this media is currently active and is playing

Public Methods

NameDescription
GetMediaIdRefresh the media id and set Id
GetPeerIdGet the peer id
SetMuteSet IsMuted
ToggleMuteToggle IsMuted
AudioPushDataSends data to the audio stream. The data has to be interleaved [-1, 1] float data.
AudioPushDataTaskSends data to the audio stream. The data has to be interleaved [-1, 1] float data.
AudioPushDataAsyncSend audio data and use custom CancellationSource The data has to be interleaved [-1, 1] float data.
AudioReadDataRead audio data
AudioReadDataTaskRead audio data
AudioReadDataAsyncRead audio data and use custom CancellationSource
AudioDataLengthGet the number of available sample available in the audio buffer.
CancelCancel the custom CancellationSource
ToString
Dispose