Class WebRTC
Definition
- Namespace:
- Tizen.Multimedia.Remoting
- Assembly:
- Tizen.Multimedia.Remoting.dll
- API Level:
- 9
Provides the ability to control WebRTC.
C#Copypublic class WebRTC : IDisposable
- Inheritance
-
WebRTC
Constructors
Declaration
C#Copypublic WebRTC()
API Level: 9
Privilege Level: public
Privilege: http://tizen.org/privilege/internet
Feature: http://tizen.org/feature/network.wifihttp://tizen.org/feature/network.telephonyhttp://tizen.org/feature/network.ethernet
Properties
Declaration
C#Copypublic WebRTCBundlePolicy BundlePolicy { get; set; }
Property Value
Type | Description |
---|---|
WebRTCBundlePolicy | The policy of bundle |
API Level: 10
Declaration
C#Copypublic WebRTCIceConnectionState IceConnectionState { get; }
Property Value
Type | Description |
---|---|
WebRTCIceConnectionState | The current ICE connection state of the WebRTC. |
API Level: 9
Declaration
C#Copypublic WebRTCIceGatheringState IceGatheringState { get; }
Property Value
Type | Description |
---|---|
WebRTCIceGatheringState | The current Ice gathering state of the WebRTC. |
API Level: 9
Declaration
C#Copypublic IceTransportPolicy IceTransportPolicy { get; set; }
Property Value
Type | Description |
---|---|
IceTransportPolicy | The policy of ICE transport |
API Level: 9
Declaration
C#Copypublic WebRTCPeerConnectionState PeerConnectionState { get; }
Property Value
Type | Description |
---|---|
WebRTCPeerConnectionState | The current peer connection state of the WebRTC. |
API Level: 9
Declaration
C#Copypublic WebRTCSignalingState SignalingState { get; }
Property Value
Type | Description |
---|---|
WebRTCSignalingState | The current signaling state of the WebRTC. |
API Level: 9
Declaration
C#Copypublic WebRTCState State { get; }
Property Value
Type | Description |
---|---|
WebRTCState | The current state of the WebRTC. |
API Level: 9
Declaration
C#Copypublic string StunServer { get; set; }
Property Value
Type | Description |
---|---|
String | The STUN server url |
API Level: 9
Methods
AddIceCandidate(String)
Adds a new ICE candidate from the remote peer over its signaling channel.
Declaration
C#Copypublic void AddIceCandidate(string iceCandidate)
Parameters
Type | Name | Description |
---|---|---|
String | iceCandidate | The ICE candidate. |
Remarks
The WebRTC must be in the Negotiating.
API Level: 9
AddIceCandidates(IEnumerable<String>)
Adds new ICE candidates from the remote peer over its signaling channel.
Declaration
C#Copypublic void AddIceCandidates(IEnumerable<string> iceCandidates)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | iceCandidates | The ICE candidates. |
Remarks
The WebRTC must be in the Negotiating.
API Level: 9
Declaration
C#Copypublic void AddSource(MediaSource source)
Parameters
Type | Name | Description |
---|---|---|
MediaSource | source | The media sources to add. |
Remarks
The WebRTC must be in the Idle.
Each MediaSource requires different feature or privilege.
MediaCameraSource needs camera feature and privilege.
MediaMicrophoneSource needs microphone feature and recorder privilege.
See Also
API Level: 9
Privilege Level: public
Privilege: http://tizen.org/privilege/camerahttp://tizen.org/privilege/mediastoragehttp://tizen.org/privilege/externalstoragehttp://tizen.org/privilege/recorder
Feature: http://tizen.org/feature/camerahttp://tizen.org/feature/microphonehttp://tizen.org/feature/display
Declaration
C#Copypublic void AddSources(params MediaSource[] sources)
Parameters
Type | Name | Description |
---|---|---|
MediaSource[] | sources | The media sources to add. |
Remarks
The WebRTC must be in the Idle.
Each MediaSource requires different feature or privilege.
MediaCameraSource needs camera feature and privilege.
MediaMicrophoneSource needs microphone feature and recorder privilege.
See Also
API Level: 9
Privilege Level: public
Privilege: http://tizen.org/privilege/camerahttp://tizen.org/privilege/mediastoragehttp://tizen.org/privilege/externalstoragehttp://tizen.org/privilege/recorder
Feature: http://tizen.org/feature/camerahttp://tizen.org/feature/microphonehttp://tizen.org/feature/display
CreateAnswerAsync()
Creates SDP answer asynchronously with option to an offer received from a remote peer.
Declaration
C#Copypublic Task<string> CreateAnswerAsync()
Returns
Type | Description |
---|---|
Task<String> | The SDP answer. |
Remarks
The WebRTC must be in the Negotiating
See Also
API Level: 9
CreateOfferAsync()
Creates SDP offer asynchronously to start a new WebRTC connection to a remote peer.
Declaration
C#Copypublic Task<string> CreateOfferAsync()
Returns
Type | Description |
---|---|
Task<String> | The SDP offer. |
Remarks
The WebRTC must be in the Negotiating
See Also
API Level: 9
Declaration
C#Copypublic void Dispose()
API Level: 9
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Declaration
C#Copypublic ReadOnlyCollection<WebRTC.WebRTCStatistics> GetStatistics(WebRTCStatisticsCategory category)
Parameters
Type | Name | Description |
---|---|---|
WebRTCStatisticsCategory | category | The category of statistics to get. |
Returns
Type | Description |
---|---|
ReadOnlyCollection<WebRTC.WebRTCStatistics> | The WebRTC statistics informations. |
Remarks
The WebRTC must be in the Playing
API Level: 10
Declaration
C#Copypublic ReadOnlyCollection<string> GetTurnServer()
Returns
Type | Description |
---|---|
ReadOnlyCollection<String> | The turn server list. |
API Level: 9
Declaration
C#Copypublic void RemoveSource(MediaSource source)
Parameters
Type | Name | Description |
---|---|---|
MediaSource | source | The media source to remove. |
Remarks
The WebRTC must be in the Idle.
If user want to use removed MediaSource again, user should create new instance for it.
See Also
API Level: 9
Declaration
C#Copypublic void RemoveSources(params MediaSource[] sources)
Parameters
Type | Name | Description |
---|---|---|
MediaSource[] | sources | The media source to remove. |
Remarks
The WebRTC must be in the Idle.
If user want to use removed MediaSource again, user should create new instance for it.
See Also
API Level: 9
Declaration
C#Copypublic void SetLocalDescription(string description)
Parameters
Type | Name | Description |
---|---|---|
String | description | The local session description. |
Remarks
The WebRTC must be in the Negotiating.
API Level: 9
SetRemoteDescription(String)
Sets the session description of the remote peer's current offer or answer.
Declaration
C#Copypublic void SetRemoteDescription(string description)
Parameters
Type | Name | Description |
---|---|---|
String | description | The remote session description. |
Remarks
The WebRTC must be in the Negotiating.
API Level: 9
Declaration
C#Copypublic void SetTurnServer(string turnServer)
Parameters
Type | Name | Description |
---|---|---|
String | turnServer |
API Level: 9
Declaration
C#Copypublic void SetTurnServers(params string[] turnServers)
Parameters
Type | Name | Description |
---|---|---|
String[] | turnServers |
API Level: 9
Declaration
C#Copypublic void Start()
Remarks
The WebRTC must be in the Idle state.
The WebRTC state will be Negotiating state.
The user should check whether State is changed to Negotiating state or not.
API Level: 9
Declaration
C#Copypublic Task StartAsync()
Returns
Type | Description |
---|---|
Task |
Remarks
The WebRTC must be in the Idle state.
The WebRTC state will be Negotiating state.
This ensures that State is changed to Negotiating state.
API Level: 9
Declaration
C#Copypublic void Stop()
Remarks
The WebRTC must be in the Negotiating or Playing state.
The WebRTC state will be Idle state.
The user should check whether State is changed to Idle state or not.
API Level: 9
Events
Declaration
C#Copypublic event EventHandler<WebRTCFrameEncodedEventArgs> AudioFrameEncoded
Event Type
Type | Description |
---|---|
EventHandler<WebRTCFrameEncodedEventArgs> |
API Level: 9
DataChannel
Occurs when the data channel is created to the connection by the remote peer.
Declaration
C#Copypublic event EventHandler<WebRTCDataChannelEventArgs> DataChannel
Event Type
Type | Description |
---|---|
EventHandler<WebRTCDataChannelEventArgs> |
API Level: 9
Declaration
C#Copypublic event EventHandler<WebRTCErrorOccurredEventArgs> ErrorOccurred
Event Type
Type | Description |
---|---|
EventHandler<WebRTCErrorOccurredEventArgs> |
API Level: 9
IceCandidate
Occurs when the WebRTC needs to send the ICE candidate message to the remote peer.
Declaration
C#Copypublic event EventHandler<WebRTCIceCandidateEventArgs> IceCandidate
Event Type
Type | Description |
---|---|
EventHandler<WebRTCIceCandidateEventArgs> |
API Level: 9
Declaration
C#Copypublic event EventHandler<WebRTCIceConnectionStateChangedEventArgs> IceConnectionStateChanged
Event Type
Type | Description |
---|---|
EventHandler<WebRTCIceConnectionStateChangedEventArgs> |
API Level: 9
Declaration
C#Copypublic event EventHandler<WebRTCIceGatheringStateChangedEventArgs> IceGatheringStateChanged
Event Type
Type | Description |
---|---|
EventHandler<WebRTCIceGatheringStateChangedEventArgs> |
API Level: 9
Declaration
C#Copypublic event EventHandler<EventArgs> NegotiationNeeded
Event Type
Type | Description |
---|---|
EventHandler<EventArgs> |
API Level: 9
Declaration
C#Copypublic event EventHandler<WebRTCPeerConnectionStateChangedEventArgs> PeerConnectionStateChanged
Event Type
Type | Description |
---|---|
EventHandler<WebRTCPeerConnectionStateChangedEventArgs> |
API Level: 9
Declaration
C#Copypublic event EventHandler<WebRTCSignalingStateChangedEventArgs> SignalingStateChanged
Event Type
Type | Description |
---|---|
EventHandler<WebRTCSignalingStateChangedEventArgs> |
API Level: 9
Declaration
C#Copypublic event EventHandler<WebRTCStateChangedEventArgs> StateChanged
Event Type
Type | Description |
---|---|
EventHandler<WebRTCStateChangedEventArgs> |
API Level: 9
Declaration
C#Copypublic event EventHandler<WebRTCTrackAddedEventArgs> TrackAdded
Event Type
Type | Description |
---|---|
EventHandler<WebRTCTrackAddedEventArgs> |
API Level: 9
Declaration
C#Copypublic event EventHandler<WebRTCFrameEncodedEventArgs> VideoFrameEncoded
Event Type
Type | Description |
---|---|
EventHandler<WebRTCFrameEncodedEventArgs> |