Interface IPeerConnection
WebRTC の RTCPeerConnection の抽象。
public interface IPeerConnection : IAsyncDisposable
- Inherited Members
Remarks
.NET 標準には WebRTC の実装が無いため(Python 版は aiortc を使います)、音声経路を使うときは SIPSorcery などでこのインターフェイスを実装し、IPeerConnectionFactory として渡してください。 メタデータ・チャット・コントロール API は実装無しで動作します。
Properties
ConnectionState
接続状態("new"、"connecting"、"connected"、"disconnected"、"failed"、"closed")。
string ConnectionState { get; }
Property Value
LocalSdp
現在のローカル SDP。
string? LocalSdp { get; }
Property Value
Methods
AddTransceiver(object?, string)
トランシーバーを追加します。track が null なら受信専用("recvonly")。
void AddTransceiver(object? track, string direction)
Parameters
CloseAsync()
Task CloseAsync()
Returns
CreateAnswerAsync()
SDP answer を作ります。
Task<string> CreateAnswerAsync()
Returns
CreateOfferAsync()
SDP offer を作ります。
Task<string> CreateOfferAsync()
Returns
SetLocalDescriptionAsync(string, string)
Task SetLocalDescriptionAsync(string type, string sdp)
Parameters
Returns
SetRemoteDescriptionAsync(string, string)
Task SetRemoteDescriptionAsync(string type, string sdp)
Parameters
Returns
Events
ConnectionStateChanged
接続状態が変わったとき。
event Action? ConnectionStateChanged
Event Type
TrackReceived
リモートのトラックを受け取ったとき(実装固有のオブジェクト)。
event Action<object>? TrackReceived