|
Webrtc Unity Plugin
v01
Cross-platform Webrtc support for Unity apps ☁🎲
|
High-level wrapper for Unity Webrtc functionality More...
Classes | |
| struct | ConfigurableIceServer |
| Represents an Ice server in a simple way that allows configuration from the unity inspector More... | |
| class | WebrtcErrorEvent |
| A UnityEvent that represents error events More... | |
Public Types | |
| enum | IceType { IceType.None = 0, IceType.Stun, IceType.Turn } |
| Different Ice server types More... | |
Public Member Functions | |
| void | InitializeAsync () |
| Initialize the underlying Webrtc libraries More... | |
| void | Uninitialize () |
| Uninitialize the underlying webrtc libraries, effectively cleaning up the allocated peer More... | |
Public Attributes | |
| bool | AutoInitialize = true |
| Flag to initialize Webrtc on Start More... | |
| bool | AutoLogErrors = true |
| Flag to log all errors to the Unity console automatically More... | |
| List< ConfigurableIceServer > | IceServers |
| Set of ice servers More... | |
| string | IceUsername |
| string | IceCredential |
| UnityEvent | OnInitialized = new UnityEvent() |
| Event that occurs when Webrtc is fully initialized More... | |
| WebrtcErrorEvent | OnError = new WebrtcErrorEvent() |
| Event that occurs when a Webrtc error occurs More... | |
Properties | |
| IPeer | Peer [get, protected set] |
| Retrieves the underlying peer More... | |
High-level wrapper for Unity Webrtc functionality
|
strong |
Different Ice server types
| Enumerator | |
|---|---|
| None | Indicates there is no Ice information Under normal use, this should not be used |
| Stun | Indicates Ice information is of type STUN |
| Turn | Indicates Ice information is of type TURN https://en.wikipedia.org/wiki/Traversal_Using_Relays_around_NAT |
| void UnityWebrtc.Webrtc.InitializeAsync | ( | ) |
Initialize the underlying Webrtc libraries
This function is asynchronous, to monitor it's status bind a handler to OnInitialized and OnError
| void UnityWebrtc.Webrtc.Uninitialize | ( | ) |
Uninitialize the underlying webrtc libraries, effectively cleaning up the allocated peer
Peer will be null afterward
| bool UnityWebrtc.Webrtc.AutoInitialize = true |
Flag to initialize Webrtc on Start
| bool UnityWebrtc.Webrtc.AutoLogErrors = true |
Flag to log all errors to the Unity console automatically
| List<ConfigurableIceServer> UnityWebrtc.Webrtc.IceServers |
Set of ice servers
| WebrtcErrorEvent UnityWebrtc.Webrtc.OnError = new WebrtcErrorEvent() |
Event that occurs when a Webrtc error occurs
| UnityEvent UnityWebrtc.Webrtc.OnInitialized = new UnityEvent() |
Event that occurs when Webrtc is fully initialized
|
getprotected set |
Retrieves the underlying peer
If OnInitialized has not fired, this will be null