Class RTCPeerConnection | WebRTC | 1.1.2-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

    IceConnectionState

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

    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

    Methods

    AddIceCandidate(ref RTCIceCandidate)

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

    AddTrack(MediaStreamTrack)

    Declaration
    public RTCRtpSender AddTrack(MediaStreamTrack track)
    Parameters
    Type Name Description
    MediaStreamTrack track
    Returns
    Type Description
    RTCRtpSender

    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

    GetLocalDescription()

    Declaration
    public RTCSessionDescription GetLocalDescription()
    Returns
    Type Description
    RTCSessionDescription

    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 RTCSessionDescriptionAsyncOperation SetLocalDescription(ref RTCSessionDescription desc)
    Parameters
    Type Name Description
    RTCSessionDescription desc
    Returns
    Type Description
    RTCSessionDescriptionAsyncOperation

    SetRemoteDescription(ref RTCSessionDescription)

    Declaration
    public RTCSessionDescriptionAsyncOperation SetRemoteDescription(ref RTCSessionDescription desc)
    Parameters
    Type Name Description
    RTCSessionDescription desc
    Returns
    Type Description
    RTCSessionDescriptionAsyncOperation
    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