Class AudioSdp
Offers and answers of one Opus audio stream over WebRTC: bundled, with RTCP multiplexed, ICE credentials, DTLS-SRTP, and trickled candidates. An offer's VP8 video may be accepted for receiving, sending or both; other media are rejected in the answer.
Namespace: Uniform.Matrix.WebRtc.Sdp
Assembly: Uniform.Matrix.WebRtc.dll
public static class AudioSdp
Fields
|
Edit this page
View Source
The payload type offered for Opus, as browsers use.
Declaration
public const byte OpusPayloadType = 111
Field Value
|
Edit this page
View Source
Declaration
public const byte OrientationId = 4
Field Value
|
Edit this page
View Source
Declaration
public const string VideoOrientation = "urn:3gpp:video-orientation"
Field Value
|
Edit this page
View Source
The payload type offered for VP8, as browsers use.
Declaration
public const byte Vp8PayloadType = 96
Field Value
Methods
|
Edit this page
View Source
Return the answer to offer: its audio section accepted, with this side the DTLS client unless setup says otherwise, and the other sections rejected. An offer without Opus audio, as an SFU's before anyone publishes, gets its sections rejected, and the transport's credentials at the session level, so that the transport connects all the same.
Declaration
public static SessionDescription CreateAnswer(SessionDescription offer, LocalAudio local, string setup = "active", bool receiveVideo = false, bool sendVideo = false)
Parameters
| Type |
Name |
Description |
| SessionDescription |
offer |
The peer's offer.
|
| LocalAudio |
local |
This side's audio.
|
| string |
setup |
This side's DTLS role: active for a new connection, the current role when answering a renegotiation.
|
| bool |
receiveVideo |
Whether to receive the offer's VP8 video, when the peer sends it.
|
| bool |
sendVideo |
Whether to send VP8 video with VideoSsrc, when the peer receives it.
|
Returns
Exceptions
|
Edit this page
View Source
Return an offer of audio, as the caller sends it in m.call.invite; with video, also of VP8 video both ways; with sendOnly, each only sent, as to an SFU that is published to.
Declaration
public static SessionDescription CreateOffer(LocalAudio local, bool video = false, bool sendOnly = false)
Parameters
Returns
|
Edit this page
View Source
Return an offer that restarts ICE: previous, this side's last offer or answer, with the new ICE credentials of local, setup:actpass, no candidates, and the session version increased; the sections and their order stay, rejected ones too, as renegotiation requires.
Declaration
public static SessionDescription CreateRestartOffer(SessionDescription previous, LocalAudio local)
Parameters
Returns
|
Edit this page
View Source
Return the peer's audio from its offer or answer: the first audio section with Opus and DTLS-SRTP, one that is not inactive when there is one, as an SFU leaves the sections of tracks gone inactive; null when there is none.
Declaration
public static RemoteAudio? Read(SessionDescription sdp)
Parameters
Returns
|
Edit this page
View Source
Return the peer's transport from its offer or answer: the credentials and fingerprint of its first section over DTLS that is not rejected, or of the session; null when there are none.
Declaration
public static RemoteTransport? ReadTransport(SessionDescription sdp)
Parameters
Returns
|
Edit this page
View Source
Return the peer's video from its offer or answer: the first video section with VP8 and DTLS-SRTP, one that is not inactive when there is one; null when there is none.
Declaration
public static RemoteVideo? ReadVideo(SessionDescription sdp)
Parameters
Returns
|
Edit this page
View Source
Return the direction of this side's video answering a peer's offered direction: receiving when wanted and the peer sends, sending when wanted and the peer receives.
Declaration
public static string VideoDirection(string offered, bool receive, bool send)
Parameters
Returns