Class RTCPeerConnection | WebRTC | 2.0.5-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class RTCPeerConnection

    Inheritance
    Object
    RTCPeerConnection
    Namespace: Unity.WebRTC
    Syntax
    public class RTCPeerConnection : IDisposable

    Constructors

    RTCPeerConnection()

    Declaration
    public RTCPeerConnection()

    RTCPeerConnection(ref RTCConfiguration)

    Declaration
    public RTCPeerConnection(ref RTCConfiguration config)
    Parameters
    Type Name Description
    RTCConfiguration config

    Fields

    OnStatsDelivered

    Declaration
    public Action<string> OnStatsDelivered
    Field Value
    Type Description
    Action<String>

    Properties

    ConnectionState

    Declaration
    public RTCPeerConnectionState ConnectionState { get; }
    Property Value
    Type Description
    RTCPeerConnectionState

    CurrentLocalDescription

    Declaration
    public RTCSessionDescription CurrentLocalDescription { get; }
    Property Value
    Type Description
    RTCSessionDescription

    CurrentRemoteDescription

    Declaration
    public RTCSessionDescription CurrentRemoteDescription { get; }
    Property Value
    Type Description
    RTCSessionDescription

    IceConnectionState

    Declaration
    public RTCIceConnectionState IceConnectionState { get; }
    Property Value
    Type Description
    RTCIceConnectionState

    LocalDescription

    Declaration
    public RTCSessionDescription LocalDescription { get; }
    Property Value
    Type Description
    RTCSessionDescription

    OnDataChannel

    Declaration
    public DelegateOnDataChannel OnDataChannel { get; set; }
    Property Value
    Type Description
    DelegateOnDataChannel

    OnIceCandidate

    Declaration
    public DelegateOnIceCandidate OnIceCandidate { get; set; }
    Property Value
    Type Description
    DelegateOnIceCandidate

    OnIceConnectionChange

    Declaration
    public DelegateOnIceConnectionChange OnIceConnectionChange { get; set; }
    Property Value
    Type Description
    DelegateOnIceConnectionChange

    OnNegotiationNeeded

    Declaration
    public DelegateOnNegotiationNeeded OnNegotiationNeeded { get; set; }
    Property Value
    Type Description
    DelegateOnNegotiationNeeded

    OnTrack

    Declaration
    public DelegateOnTrack OnTrack { get; set; }
    Property Value
    Type Description
    DelegateOnTrack

    PendingLocalDescription

    Declaration
    public RTCSessionDescription PendingLocalDescription { get; }
    Property Value
    Type Description
    RTCSessionDescription

    PendingRemoteDescription

    Declaration
    public RTCSessionDescription PendingRemoteDescription { get; }
    Property Value
    Type Description
    RTCSessionDescription

    RemoteDescription

    Declaration
    public RTCSessionDescription RemoteDescription { get; }
    Property Value
    Type Description
    RTCSessionDescription

    Methods

    AddIceCandidate(ref RTCIceCandidate)

    Declaration
    public void AddIceCandidate(ref RTCIceCandidate candidate)
    Parameters
    Type Name Description
    RTCIceCandidate candidate

    AddTrack(MediaStreamTrack, MediaStream)

    Declaration
    public RTCRtpSender AddTrack(MediaStreamTrack track, MediaStream stream = null)
    Parameters
    Type Name Description
    MediaStreamTrack track
    MediaStream stream
    Returns
    Type Description
    RTCRtpSender

    AddTransceiver(MediaStreamTrack)

    Declaration
    public RTCRtpTransceiver AddTransceiver(MediaStreamTrack track)
    Parameters
    Type Name Description
    MediaStreamTrack track
    Returns
    Type Description
    RTCRtpTransceiver

    Close()

    Declaration
    public void Close()

    CollectStats()

    Declaration
    public void CollectStats()

    CreateAnswer(ref RTCAnswerOptions)

    Declaration
    public RTCSessionDescriptionAsyncOperation CreateAnswer(ref RTCAnswerOptions options)
    Parameters
    Type Name Description
    RTCAnswerOptions options
    Returns
    Type Description
    RTCSessionDescriptionAsyncOperation

    CreateDataChannel(String, ref RTCDataChannelInit)

    Declaration
    public RTCDataChannel CreateDataChannel(string label, ref RTCDataChannelInit options)
    Parameters
    Type Name Description
    String label
    RTCDataChannelInit options
    Returns
    Type Description
    RTCDataChannel

    CreateOffer(ref RTCOfferOptions)

    Declaration
    public RTCSessionDescriptionAsyncOperation CreateOffer(ref RTCOfferOptions options)
    Parameters
    Type Name Description
    RTCOfferOptions options
    Returns
    Type Description
    RTCSessionDescriptionAsyncOperation

    Dispose()

    Declaration
    public void Dispose()

    Finalize()

    Declaration
    protected void Finalize()

    GetConfiguration()

    Declaration
    public RTCConfiguration GetConfiguration()
    Returns
    Type Description
    RTCConfiguration

    GetReceivers()

    Declaration
    public IEnumerable<RTCRtpReceiver> GetReceivers()
    Returns
    Type Description
    IEnumerable<RTCRtpReceiver>

    GetSenders()

    Declaration
    public IEnumerable<RTCRtpSender> GetSenders()
    Returns
    Type Description
    IEnumerable<RTCRtpSender>

    GetTransceivers()

    Declaration
    public IEnumerable<RTCRtpTransceiver> GetTransceivers()
    Returns
    Type Description
    IEnumerable<RTCRtpTransceiver>

    RemoveTrack(RTCRtpSender)

    Declaration
    public void RemoveTrack(RTCRtpSender sender)
    Parameters
    Type Name Description
    RTCRtpSender sender

    SetConfiguration(ref RTCConfiguration)

    Declaration
    public RTCErrorType SetConfiguration(ref RTCConfiguration config)
    Parameters
    Type Name Description
    RTCConfiguration config
    Returns
    Type Description
    RTCErrorType

    SetLocalDescription(ref RTCSessionDescription)

    Declaration
    public RTCSetSessionDescriptionAsyncOperation SetLocalDescription(ref RTCSessionDescription desc)
    Parameters
    Type Name Description
    RTCSessionDescription desc
    Returns
    Type Description
    RTCSetSessionDescriptionAsyncOperation

    SetRemoteDescription(ref RTCSessionDescription)

    Declaration
    public RTCSetSessionDescriptionAsyncOperation SetRemoteDescription(ref RTCSessionDescription desc)
    Parameters
    Type Name Description
    RTCSessionDescription desc
    Returns
    Type Description
    RTCSetSessionDescriptionAsyncOperation
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023