Interface IMediaConnection
The media of a call, as its voice and video pipelines see it: Opus frames and VP8 frames each way, with the feedback of the video; a AudioPeerConnection to the peer, or the connections of an SFU call together.
Namespace: Uniform.Matrix.WebRtc
Assembly: Uniform.Matrix.WebRtc.dll
public interface IMediaConnection
Properties
|
Edit this page
View Source
Declaration
bool ReceivesVideo { get; }
Property Value
|
Edit this page
View Source
Whether the rotation of sent frames reaches the receiver, with the video orientation extension; when not, frames must be sent upright.
Declaration
bool SendsOrientation { get; }
Property Value
|
Edit this page
View Source
Declaration
Property Value
Methods
|
Edit this page
View Source
Ask the sender of the video received to send at most bitsPerSecond.
Declaration
Task RequestBitrateAsync(long bitsPerSecond)
Parameters
| Type |
Name |
Description |
| long |
bitsPerSecond |
|
Returns
|
Edit this page
View Source
Ask the sender of the video received for a keyframe.
Declaration
Task RequestKeyframeAsync()
Returns
|
Edit this page
View Source
Send a frame of Opus, samples long at 48 kHz.
Declaration
ValueTask SendAudioAsync(byte[] opus, int samples = 960, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
Send a VP8 frame, captured now, shown upright with rotation degrees clockwise.
Declaration
ValueTask SendVideoAsync(byte[] frame, CancellationToken cancellationToken = default, int rotation = 0)
Parameters
Returns
|
Edit this page
View Source
Skip samples without sending, e.g. while muted, so the timestamps stay in time.
Declaration
void SkipAudio(int samples = 960)
Parameters
| Type |
Name |
Description |
| int |
samples |
|
Events
|
Edit this page
View Source
Raised for each audio packet received, its payload Opus; on a network thread.
Declaration
event Action<RtpPacket>? AudioReceived
Event Type
|
Edit this page
View Source
Raised when the receiver asks to limit the video sent to a bitrate, in bits per second.
Declaration
event Action<long>? BitrateRequested
Event Type
|
Edit this page
View Source
Raised when the receiver asks for a keyframe of the video sent.
Declaration
event Action? KeyframeRequested
Event Type
|
Edit this page
View Source
Raised for each whole VP8 frame received, in order; on a network thread.
Declaration
event Action<Vp8EncodedFrame>? VideoReceived
Event Type