MediaStream
On this page
public abstract class MediaStream : IDisposable
Base stream
Properties
Name | Type | Description |
---|---|---|
Id | UInt16 | Media id |
MediaConfig | OdinMediaConfig | Audio config |
CancellationSource | CancellationTokenSource | Control of async read and write tasks |
IsMuted | Boolean | Determine to send and/or read data |
IsActive | Boolean | Determine if this media is currently active and is playing |
Public Methods
Name | Description |
---|---|
GetMediaId | Refresh the media id and set Id |
GetPeerId | Get the peer id |
SetMute | Set IsMuted |
ToggleMute | Toggle IsMuted |
AudioPushData | Sends data to the audio stream. The data has to be interleaved [-1, 1] float data. |
AudioPushDataTask | Sends data to the audio stream. The data has to be interleaved [-1, 1] float data. |
AudioPushDataAsync | Send audio data and use custom CancellationSource The data has to be interleaved [-1, 1] float data. |
AudioReadData | Read audio data |
AudioReadDataTask | Read audio data |
AudioReadDataAsync | Read audio data and use custom CancellationSource |
AudioDataLength | Get the number of available sample available in the audio buffer. |
Cancel | Cancel the custom CancellationSource |
ToString | |
Dispose |