Tizen Native API  7.0

The WebRTC API provides functions for real-time audio/video communication between peers. It supports WebRTC as a native API based on GStreamer multimedia framework.

Required Header

#include <webrtc.h>

Overview

The WebRTC API provides functions to communicate with the remote peer using multimedia sources and generic data. The multimedia sources include audio/video stream from microphone, camera or media file. The generic data includes string or byte data.
This API set allows you to:

  • add/remove/mute/pause the media source
  • create/destroy data channel and send/receive data via the channel
  • set display surface to render the received video data
  • start/stop the state of the handle
  • make negotiation with the remote peer
  • query the various states of the handle including session negotiation
  • get notified about various changes via callbacks

State Transitions

FUNCTION PRE-STATE POST-STATE SYNC TYPE
webrtc_create() NONE IDLE SYNC
webrtc_destroy() IDLE/NEGOTIATING/PLAYING NONE SYNC
webrtc_start() IDLE NEGOTIATING ASYNC
webrtc_stop() NEGOTIATING/PLAYING IDLE ASYNC
webrtc_set_remote_description() NEGOTIATING PLAYING* ASYNC
webrtc_set_local_description() NEGOTIATING PLAYING* ASYNC
webrtc_add_ice_candidate() NEGOTIATING PLAYING* ASYNC

(*) The transition from the NEGOTIATING state to the PLAYING state will be processed after finishing all the negotiation.

Callback(Event) Operations

The callback mechanism is used to notify the application about significant webrtc events.

REGISTER UNREGISTER CALLBACK DESCRIPTION
webrtc_set_state_changed_cb() webrtc_unset_state_changed_cb() webrtc_state_changed_cb() This callback is used to notify that the WebRTC state has changed
webrtc_set_error_cb() webrtc_unset_error_cb() webrtc_error_cb() This callback is used to notify that an error has occurred
webrtc_set_negotiation_needed_cb() webrtc_unset_negotiation_needed_cb() webrtc_negotiation_needed_cb() This callback is used to notify that the WebRTC requires session negotiation
webrtc_set_peer_connection_state_change_cb() webrtc_unset_peer_connection_state_change_cb() webrtc_peer_connection_state_change_cb() This callback is used to notify that the WebRTC peer connection state has changed
webrtc_set_signaling_state_change_cb() webrtc_unset_signaling_state_change_cb() webrtc_signaling_state_change_cb() This callback is used to notify that the WebRTC signaling state has changed
webrtc_set_ice_gathering_state_change_cb() webrtc_unset_ice_gathering_state_change_cb() webrtc_ice_gathering_state_change_cb() This callback is used to notify that the WebRTC ICE gathering state has changed
webrtc_set_ice_connection_state_change_cb() webrtc_unset_ice_connection_state_change_cb() webrtc_ice_connection_state_change_cb() This callback is used to notify that the WebRTC ICE connection state has changed

Foreach Operations

FOREACH CALLBACK DESCRIPTION
webrtc_foreach_turn_server() webrtc_turn_server_cb() It retrieves the added TURN server one by one

Related Features

This API is related with the following features:

  • http://tizen.org/feature/network.wifi
  • http://tizen.org/feature/network.telephony
  • http://tizen.org/feature/network.ethernet

It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.

Functions

int webrtc_set_error_cb (webrtc_h webrtc, webrtc_error_cb callback, void *user_data)
 Sets a callback function to be invoked when an asynchronous operation error occurs.
int webrtc_unset_error_cb (webrtc_h webrtc)
 Unsets the error callback function.
int webrtc_create (webrtc_h *webrtc)
 Creates an instance of WebRTC.
int webrtc_start (webrtc_h webrtc)
 Starts the WebRTC.
int webrtc_stop (webrtc_h webrtc)
 Stops the WebRTC.
int webrtc_destroy (webrtc_h webrtc)
 Destroys the WebRTC.
int webrtc_set_state_changed_cb (webrtc_h webrtc, webrtc_state_changed_cb callback, void *user_data)
 Sets a callback function to be invoked when the WebRTC state is changed.
int webrtc_unset_state_changed_cb (webrtc_h webrtc)
 Unsets the state changed callback function.
int webrtc_get_state (webrtc_h webrtc, webrtc_state_e *state)
 Gets the WebRTC state.
int webrtc_set_stun_server (webrtc_h webrtc, const char *stun_server)
 Sets a STUN server URL.
int webrtc_get_stun_server (webrtc_h webrtc, char **stun_server)
 Gets the STUN server URL.
int webrtc_add_turn_server (webrtc_h webrtc, const char *turn_server)
 Adds a TURN server URL.
int webrtc_foreach_turn_server (webrtc_h webrtc, webrtc_turn_server_cb callback, void *user_data)
 Retrieves all the TURN server URLs.
int webrtc_set_bundle_policy (webrtc_h webrtc, webrtc_bundle_policy_e policy)
 Sets a bundle policy.
int webrtc_get_bundle_policy (webrtc_h webrtc, webrtc_bundle_policy_e *policy)
 Gets the bundle policy.
int webrtc_set_ice_transport_policy (webrtc_h webrtc, webrtc_ice_transport_policy_e policy)
 Sets a ICE transport policy that represents which candidates the ICE Agent is allowed to use.
int webrtc_get_ice_transport_policy (webrtc_h webrtc, webrtc_ice_transport_policy_e *policy)
 Gets the ICE transport policy.
int webrtc_set_peer_connection_state_change_cb (webrtc_h webrtc, webrtc_peer_connection_state_change_cb callback, void *user_data)
 Sets a callback function to be invoked when the WebRTC peer connection state is changed.
int webrtc_unset_peer_connection_state_change_cb (webrtc_h webrtc)
 Unsets the peer connection state change callback function.
int webrtc_get_peer_connection_state (webrtc_h webrtc, webrtc_peer_connection_state_e *state)
 Gets the peer connection state.
int webrtc_set_signaling_state_change_cb (webrtc_h webrtc, webrtc_signaling_state_change_cb callback, void *user_data)
 Sets a callback function to be invoked when the WebRTC signaling state is changed.
int webrtc_unset_signaling_state_change_cb (webrtc_h webrtc)
 Unsets the signaling state change callback function.
int webrtc_get_signaling_state (webrtc_h webrtc, webrtc_signaling_state_e *state)
 Gets the signaling state.
int webrtc_set_ice_gathering_state_change_cb (webrtc_h webrtc, webrtc_ice_gathering_state_change_cb callback, void *user_data)
 Sets a callback function to be invoked when the WebRTC ICE gathering state is changed.
int webrtc_unset_ice_gathering_state_change_cb (webrtc_h webrtc)
 Unsets the ICE gathering state change callback function.
int webrtc_get_ice_gathering_state (webrtc_h webrtc, webrtc_ice_gathering_state_e *state)
 Gets the ICE gathering state.
int webrtc_set_ice_connection_state_change_cb (webrtc_h webrtc, webrtc_ice_connection_state_change_cb callback, void *user_data)
 Sets a callback function to be invoked when the WebRTC ICE connection state is changed.
int webrtc_unset_ice_connection_state_change_cb (webrtc_h webrtc)
 Unsets the ICE connection state change callback function.
int webrtc_get_ice_connection_state (webrtc_h webrtc, webrtc_ice_connection_state_e *state)
 Gets the ICE connection state.
int webrtc_set_negotiation_needed_cb (webrtc_h webrtc, webrtc_negotiation_needed_cb callback, void *user_data)
 Sets a negotiation needed callback function to be invoked when a change has occurred which requires session negotiation.
int webrtc_unset_negotiation_needed_cb (webrtc_h webrtc)
 Unsets the negotiation needed callback function.
int webrtc_set_ice_candidate_cb (webrtc_h webrtc, webrtc_ice_candidate_cb callback, void *user_data)
 Sets an ICE candidate callback function to be invoked when the WebRTC needs to send the ICE candidate message to the remote peer.
int webrtc_unset_ice_candidate_cb (webrtc_h webrtc)
 Unsets the ice candidate callback function.
int webrtc_create_offer (webrtc_h webrtc, bundle *options, char **offer)
 Creates SDP offer to start a new WebRTC connection to a remote peer.
int webrtc_create_answer (webrtc_h webrtc, bundle *options, char **answer)
 Creates SDP answer to an offer received from a remote peer during the negotiation of a WebRTC connection.
int webrtc_create_offer_async (webrtc_h webrtc, bundle *options, webrtc_session_description_created_cb callback, void *user_data)
 Creates SDP offer asynchronously to start a new WebRTC connection to a remote peer.
int webrtc_create_answer_async (webrtc_h webrtc, bundle *options, webrtc_session_description_created_cb callback, void *user_data)
 Creates SDP answer asynchronously to an offer received from a remote peer during the negotiation of a WebRTC connection.
int webrtc_set_local_description (webrtc_h webrtc, const char *description)
 Sets the session description for a local peer associated with a WebRTC connection.
int webrtc_set_remote_description (webrtc_h webrtc, const char *description)
 Sets the session description of the remote peer's current offer or answer.
int webrtc_add_ice_candidate (webrtc_h webrtc, const char *candidate)
 Adds a new ICE candidate from the remote peer over its signaling channel.
int webrtc_set_track_added_cb (webrtc_h webrtc, webrtc_track_added_cb callback, void *user_data)
 Sets a track added callback function to be invoked when a new track has been added to the WebRTC.
int webrtc_unset_track_added_cb (webrtc_h webrtc)
 Unsets the track added callback function.

Typedefs

typedef void * webrtc_h
 WebRTC handle type.
typedef void(* webrtc_error_cb )(webrtc_h webrtc, webrtc_error_e error, webrtc_state_e state, void *user_data)
 Called when an error occurs.
typedef void(* webrtc_state_changed_cb )(webrtc_h webrtc, webrtc_state_e previous, webrtc_state_e current, void *user_data)
 Called when the WebRTC state is changed.
typedef void(* webrtc_session_description_created_cb )(webrtc_h webrtc, const char *description, void *user_data)
 Called when the session description is created.
typedef void(* webrtc_peer_connection_state_change_cb )(webrtc_h webrtc, webrtc_peer_connection_state_e state, void *user_data)
 Called when the WebRTC peer connection state is changed.
typedef void(* webrtc_signaling_state_change_cb )(webrtc_h webrtc, webrtc_signaling_state_e state, void *user_data)
 Called when the WebRTC signaling state is changed.
typedef void(* webrtc_ice_gathering_state_change_cb )(webrtc_h webrtc, webrtc_ice_gathering_state_e state, void *user_data)
 Called when the WebRTC ICE gathering state is changed.
typedef void(* webrtc_ice_connection_state_change_cb )(webrtc_h webrtc, webrtc_ice_connection_state_e state, void *user_data)
 Called when the WebRTC ICE connection state is changed.
typedef bool(* webrtc_turn_server_cb )(const char *turn_server, void *user_data)
 Called iteratively to report all the TURN server URLs.
typedef void(* webrtc_negotiation_needed_cb )(webrtc_h webrtc, void *user_data)
 Called when the WebRTC needs session negotiation.
typedef void(* webrtc_ice_candidate_cb )(webrtc_h webrtc, const char *candidate, void *user_data)
 Called when the WebRTC needs to send the ICE candidate message to the remote peer through the signaling channel.
typedef void(* webrtc_track_added_cb )(webrtc_h webrtc, webrtc_media_type_e type, unsigned int track_id, void *user_data)
 Called when a new track has been added to the WebRTC pipeline after the negotiation.

Typedef Documentation

typedef void(* webrtc_error_cb)(webrtc_h webrtc, webrtc_error_e error, webrtc_state_e state, void *user_data)

Called when an error occurs.

The following error codes can be received:
WEBRTC_ERROR_INVALID_OPERATION
WEBRTC_ERROR_CONNECTION_FAILED
WEBRTC_ERROR_STREAM_FAILED
WEBRTC_ERROR_RESOURCE_FAILED
WEBRTC_ERROR_RESOURCE_CONFLICT

Since :
6.5
Remarks:
The webrtc is the same object for which the callback was set.
The webrtc should not be released.
Parameters:
[in]webrtcWebRTC handle
[in]errorThe error code
[in]stateThe current state of the WebRTC handle
[in]user_dataThe user data passed from the callback registration function
See also:
webrtc_set_error_cb()
webrtc_unset_error_cb()
typedef void* webrtc_h

WebRTC handle type.

Since :
6.5
typedef void(* webrtc_ice_candidate_cb)(webrtc_h webrtc, const char *candidate, void *user_data)

Called when the WebRTC needs to send the ICE candidate message to the remote peer through the signaling channel.

Since :
6.5
Remarks:
The webrtc is the same object for which the callback was set.
The webrtc should not be released.
The candidate can be used only in the callback. To use outside, make a copy.
Parameters:
[in]webrtcWebRTC handle
[in]candidateThe ICE candidate message
[in]user_dataThe user data passed from the callback registration function
Postcondition:
candidate must be sent to the remote peer via the signaling channel.
See also:
webrtc_set_ice_candidate_cb()
webrtc_unset_ice_candidate_cb()
typedef void(* webrtc_ice_connection_state_change_cb)(webrtc_h webrtc, webrtc_ice_connection_state_e state, void *user_data)

Called when the WebRTC ICE connection state is changed.

Since :
6.5
Remarks:
The webrtc is the same object for which the callback was set.
The webrtc should not be released.
Parameters:
[in]webrtcWebRTC handle
[in]stateThe ICE connection state
[in]user_dataThe user data passed from the callback registration function
See also:
webrtc_set_ice_connection_state_change_cb()
webrtc_unset_ice_connection_state_change_cb()
typedef void(* webrtc_ice_gathering_state_change_cb)(webrtc_h webrtc, webrtc_ice_gathering_state_e state, void *user_data)

Called when the WebRTC ICE gathering state is changed.

Since :
6.5
Remarks:
The webrtc is the same object for which the callback was set.
The webrtc should not be released.
Parameters:
[in]webrtcWebRTC handle
[in]stateThe ICE gathering state
[in]user_dataThe user data passed from the callback registration function
See also:
webrtc_set_ice_gathering_state_change_cb()
webrtc_unset_ice_gathering_state_change_cb()
typedef void(* webrtc_negotiation_needed_cb)(webrtc_h webrtc, void *user_data)

Called when the WebRTC needs session negotiation.

Since :
6.5
Remarks:
The webrtc is the same object for which the callback was set.
The webrtc should not be released.
Parameters:
[in]webrtcWebRTC handle
[in]user_dataThe user data passed from the callback registration function
See also:
webrtc_set_negotiation_needed_cb()
webrtc_unset_negotiation_needed_cb()
typedef void(* webrtc_peer_connection_state_change_cb)(webrtc_h webrtc, webrtc_peer_connection_state_e state, void *user_data)

Called when the WebRTC peer connection state is changed.

Since :
6.5
Remarks:
The webrtc is the same object for which the callback was set.
The webrtc should not be released.
Parameters:
[in]webrtcWebRTC handle
[in]stateThe peer connection state
[in]user_dataThe user data passed from the callback registration function
See also:
webrtc_set_peer_connection_state_change_cb()
webrtc_unset_peer_connection_state_change_cb()
typedef void(* webrtc_session_description_created_cb)(webrtc_h webrtc, const char *description, void *user_data)

Called when the session description is created.

Since :
6.5
Remarks:
The webrtc is the same object for which the callback was set.
The webrtc should not be released.
description is a JSON string.
It will be {"sdp":{"type":"offer or answer","sdp":"..."}}.
The description can be used only in the callback. To use outside, make a copy.
Parameters:
[in]webrtcWebRTC handle
[in]descriptionThe session description
[in]user_dataThe user data passed from the callback registration function
Postcondition:
description must be set as a local description by calling webrtc_set_local_description()
description must be sent to the remote peer via the signaling channel.
See also:
webrtc_create_offer_async()
webrtc_create_answer_async()
webrtc_set_local_description()
typedef void(* webrtc_signaling_state_change_cb)(webrtc_h webrtc, webrtc_signaling_state_e state, void *user_data)

Called when the WebRTC signaling state is changed.

Since :
6.5
Remarks:
The webrtc is the same object for which the callback was set.
The webrtc should not be released.
Parameters:
[in]webrtcWebRTC handle
[in]stateThe signaling state
[in]user_dataThe user data passed from the callback registration function
See also:
webrtc_set_signaling_state_change_cb()
webrtc_unset_signaling_state_change_cb()
typedef void(* webrtc_state_changed_cb)(webrtc_h webrtc, webrtc_state_e previous, webrtc_state_e current, void *user_data)

Called when the WebRTC state is changed.

Since :
6.5
Remarks:
The webrtc is the same object for which the callback was set.
The webrtc should not be released.
Parameters:
[in]webrtcWebRTC handle
[in]previousThe previous state of the WebRTC handle
[in]currentThe current state of the WebRTC handle
[in]user_dataThe user data passed from the callback registration function
See also:
webrtc_set_state_changed_cb()
webrtc_unset_state_changed_cb()
typedef void(* webrtc_track_added_cb)(webrtc_h webrtc, webrtc_media_type_e type, unsigned int track_id, void *user_data)

Called when a new track has been added to the WebRTC pipeline after the negotiation.

Since :
6.5
Remarks:
The webrtc is the same object for which the callback was set.
The webrtc should not be released.
Parameters:
[in]webrtcWebRTC handle
[in]typeThe media type
[in]track_idThe track id
[in]user_dataThe user data passed from the callback registration function
See also:
webrtc_set_track_added_cb()
webrtc_unset_track_added_cb()
typedef bool(* webrtc_turn_server_cb)(const char *turn_server, void *user_data)

Called iteratively to report all the TURN server URLs.

Since :
6.5
Remarks:
The turn_server can be used only in the callback. To use outside, make a copy.
Parameters:
[in]turn_serverThe TURN server URL
[in]user_dataThe user data passed from the callback registration function
Returns:
true to continue with the next iteration of the loop, otherwise false to break out of the loop
See also:
webrtc_foreach_turn_server()

Enumeration Type Documentation

Enumeration for WebRTC bundle policy.

Since :
7.0
Remarks:
It corresponds with the RTCBundlePolicy enum described in https://www.w3.org/TR/webrtc/#rtcbundlepolicy-enum.
Enumerator:
WEBRTC_BUNDLE_POLICY_NONE 

None

WEBRTC_BUNDLE_POLICY_MAX_BUNDLE 

Max-bundle

Enumeration for WebRTC error.

Since :
6.5
Enumerator:
WEBRTC_ERROR_NONE 

Successful

WEBRTC_ERROR_NOT_SUPPORTED 

Not supported

WEBRTC_ERROR_PERMISSION_DENIED 

Permission denied

WEBRTC_ERROR_INVALID_PARAMETER 

Invalid parameter

WEBRTC_ERROR_INVALID_OPERATION 

Invalid operation

WEBRTC_ERROR_INVALID_STATE 

Invalid state

WEBRTC_ERROR_CONNECTION_FAILED 

Connection failed

WEBRTC_ERROR_STREAM_FAILED 

Stream failed

WEBRTC_ERROR_RESOURCE_FAILED 

Resource failed

WEBRTC_ERROR_RESOURCE_CONFLICT 

Resource conflict

Enumeration for WebRTC ICE connection state.

Since :
6.5
Remarks:
It corresponds with the RTCIceConnectionState enum described in https://www.w3.org/TR/webrtc/#rtciceconnectionstate-enum.
Enumerator:
WEBRTC_ICE_CONNECTION_STATE_NEW 

New

WEBRTC_ICE_CONNECTION_STATE_CHECKING 

Checking

WEBRTC_ICE_CONNECTION_STATE_CONNECTED 

Connected

WEBRTC_ICE_CONNECTION_STATE_COMPLETED 

Completed

WEBRTC_ICE_CONNECTION_STATE_FAILED 

Failed

WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED 

Disconnected

WEBRTC_ICE_CONNECTION_STATE_CLOSED 

Closed

Enumeration for WebRTC ICE gathering state.

Since :
6.5
Remarks:
It corresponds with the RTCIceGatheringState enum described in https://www.w3.org/TR/webrtc/#rtcicegatheringstate-enum.
Enumerator:
WEBRTC_ICE_GATHERING_STATE_NEW 

New

WEBRTC_ICE_GATHERING_STATE_GATHERING 

Gathering

WEBRTC_ICE_GATHERING_STATE_COMPLETE 

Complete

Enumeration for WebRTC ICE transport policy.

Since :
6.5
Remarks:
It corresponds with the RTCIceTransportPolicy enum described in https://www.w3.org/TR/webrtc/#rtcicetransportpolicy-enum.
Enumerator:
WEBRTC_ICE_TRANSPORT_POLICY_ALL 

All

WEBRTC_ICE_TRANSPORT_POLICY_RELAY 

Relay

Enumeration for WebRTC media type.

Since :
6.5
Enumerator:
WEBRTC_MEDIA_TYPE_AUDIO 

Audio

WEBRTC_MEDIA_TYPE_VIDEO 

Video

Enumeration for WebRTC peer connection state.

Since :
6.5
Remarks:
It corresponds with the RTCPeerConnectionState enum described in https://www.w3.org/TR/webrtc/#rtcpeerconnectionstate-enum.
Enumerator:
WEBRTC_PEER_CONNECTION_STATE_NEW 

New

WEBRTC_PEER_CONNECTION_STATE_CONNECTING 

Connecting

WEBRTC_PEER_CONNECTION_STATE_CONNECTED 

Connected

WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED 

Disconnected

WEBRTC_PEER_CONNECTION_STATE_FAILED 

Failed

WEBRTC_PEER_CONNECTION_STATE_CLOSED 

Closed

Enumeration for WebRTC signaling state.

Since :
6.5
Remarks:
It corresponds with the RTCSignalingState enum described in https://www.w3.org/TR/webrtc/#rtcsignalingstate-enum.
Enumerator:
WEBRTC_SIGNALING_STATE_STABLE 

Stable

WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER 

Have local offer

WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER 

Have remote offer

WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER 

Have local provisional answer

WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER 

Have remote provisional answer

WEBRTC_SIGNALING_STATE_CLOSED 

Closed

Enumeration for WebRTC state.

See State Transitions.

Since :
6.5
Enumerator:
WEBRTC_STATE_IDLE 

Created but not started

WEBRTC_STATE_NEGOTIATING 

Started but negotiation stage

WEBRTC_STATE_PLAYING 

Started all streams


Function Documentation

int webrtc_add_ice_candidate ( webrtc_h  webrtc,
const char *  candidate 
)

Adds a new ICE candidate from the remote peer over its signaling channel.

Since :
6.5
Remarks:
candidate is a JSON string.
It will be {"ice":{"candidate":"..."}}.
Parameters:
[in]webrtcWebRTC handle
[in]candidateThe ICE candidate
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_NEGOTIATING.
int webrtc_add_turn_server ( webrtc_h  webrtc,
const char *  turn_server 
)

Adds a TURN server URL.

Since :
6.5
Remarks:
Regarding TURN, refer to the RFC7065(https://tools.ietf.org/html/rfc7065).
Parameters:
[in]webrtcWebRTC handle
[in]turn_serverThe TURN server URL of the form turn(s)://username:password@host:port
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
See also:
webrtc_foreach_turn_server()
int webrtc_create ( webrtc_h webrtc)

Creates an instance of WebRTC.

Since :
6.5
Privilege Level:
public
Privilege:
http://tizen.org/privilege/internet
Remarks:
A signaling channel not addressed in this API should be established to send SDP or ICE candidate messages to each other.
The webrtc should be released using webrtc_destroy().
Parameters:
[out]webrtcWebRTC handle
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_NOT_SUPPORTEDNot supported
WEBRTC_ERROR_PERMISSION_DENIEDPermission denied
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
Postcondition:
webrtc state will be WEBRTC_STATE_IDLE.
See also:
webrtc_destroy()
int webrtc_create_answer ( webrtc_h  webrtc,
bundle options,
char **  answer 
)

Creates SDP answer to an offer received from a remote peer during the negotiation of a WebRTC connection.

Since :
6.5
Remarks:
The answer should be released using free().
The options currently has no effect.
Parameters:
[in]webrtcWebRTC handle
[in]optionsConfiguration options for the answer (optional, this can be NULL)
[out]answerSDP answer
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_NEGOTIATING.
The remote SDP offer must be set by calling webrtc_set_remote_description().
The signaling state must be set to WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER.
Postcondition:
answer must be set as a local description by calling webrtc_set_local_description()
answer must be sent to the remote peer via the signaling channel.
See also:
webrtc_set_remote_description()
webrtc_set_local_description()
webrtc_get_signaling_state()
webrtc_set_signaling_state_change_cb()
int webrtc_create_answer_async ( webrtc_h  webrtc,
bundle options,
webrtc_session_description_created_cb  callback,
void *  user_data 
)

Creates SDP answer asynchronously to an offer received from a remote peer during the negotiation of a WebRTC connection.

Since :
6.5
Remarks:
The registered callback will be invoked in the main thread.
The options currently has no effect.
Parameters:
[in]webrtcWebRTC handle
[in]optionsConfiguration options for the answer (optional, this can be NULL)
[in]callbackCallback function pointer
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_NEGOTIATING.
The remote SDP offer must be set by calling webrtc_set_remote_description().
The signaling state must be set to WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER.
Postcondition:
webrtc_session_description_created_cb() will be invoked.
See also:
webrtc_set_remote_description()
webrtc_set_local_description()
webrtc_get_signaling_state()
webrtc_set_signaling_state_change_cb()
webrtc_session_description_created_cb()
int webrtc_create_offer ( webrtc_h  webrtc,
bundle options,
char **  offer 
)

Creates SDP offer to start a new WebRTC connection to a remote peer.

Since :
6.5
Remarks:
The offer should be released using free().
The options currently has no effect.
Parameters:
[in]webrtcWebRTC handle
[in]optionsConfiguration options for the offer (optional, this can be NULL)
[out]offerSDP offer
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_NEGOTIATING.
Postcondition:
offer must be set as a local description by calling webrtc_set_local_description()
offer must be sent to the remote peer via the signaling channel.
See also:
webrtc_state_changed_cb()
webrtc_negotiation_needed_cb()
webrtc_set_local_description()
int webrtc_create_offer_async ( webrtc_h  webrtc,
bundle options,
webrtc_session_description_created_cb  callback,
void *  user_data 
)

Creates SDP offer asynchronously to start a new WebRTC connection to a remote peer.

Since :
6.5
Remarks:
The registered callback will be invoked in the main thread.
The options currently has no effect.
Parameters:
[in]webrtcWebRTC handle
[in]optionsConfiguration options for the offer (optional, this can be NULL)
[in]callbackCallback function pointer
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_NEGOTIATING.
Postcondition:
webrtc_session_description_created_cb() will be invoked.
See also:
webrtc_state_changed_cb()
webrtc_negotiation_needed_cb()
webrtc_set_local_description()
webrtc_session_description_created_cb()
int webrtc_destroy ( webrtc_h  webrtc)

Destroys the WebRTC.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
See also:
webrtc_create()
int webrtc_foreach_turn_server ( webrtc_h  webrtc,
webrtc_turn_server_cb  callback,
void *  user_data 
)

Retrieves all the TURN server URLs.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
[in]callbackCallback function pointer
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
See also:
webrtc_turn_server_cb()
webrtc_add_turn_server()

Gets the bundle policy.

Since :
7.0
Remarks:
The default value is WEBRTC_BUNDLE_POLICY_MAX_BUNDLE.
Parameters:
[in]webrtcWebRTC handle
[out]policyThe bundle policy
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
See also:
webrtc_set_bundle_policy()

Gets the ICE connection state.

Since :
6.5
Remarks:
The default value is WEBRTC_ICE_CONNECTION_STATE_NEW.
Parameters:
[in]webrtcWebRTC handle
[out]stateThe ICE connection state
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
See also:
webrtc_set_ice_connection_state_change_cb()
webrtc_unset_ice_connection_state_change_cb()

Gets the ICE gathering state.

Since :
6.5
Remarks:
The default value is WEBRTC_ICE_GATHERING_STATE_NEW.
Parameters:
[in]webrtcWebRTC handle
[out]stateThe ICE gathering state
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
See also:
webrtc_set_ice_gathering_state_change_cb()
webrtc_unset_ice_gathering_state_change_cb()

Gets the ICE transport policy.

Since :
6.5
Remarks:
The default value is WEBRTC_ICE_TRANSPORT_POLICY_ALL.
Parameters:
[in]webrtcWebRTC handle
[out]policyThe ICE transport policy
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
See also:
webrtc_set_ice_transport_policy()

Gets the peer connection state.

Since :
6.5
Remarks:
The default value is WEBRTC_PEER_CONNECTION_STATE_NEW.
Parameters:
[in]webrtcWebRTC handle
[out]stateThe peer connection state
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
See also:
webrtc_set_peer_connection_state_change_cb()
webrtc_unset_peer_connection_state_change_cb()

Gets the signaling state.

Since :
6.5
Remarks:
The default value is WEBRTC_SIGNALING_STATE_STABLE.
Parameters:
[in]webrtcWebRTC handle
[out]stateThe signaling state
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
See also:
webrtc_set_signaling_state_change_cb()
webrtc_unset_signaling_state_change_cb()
int webrtc_get_state ( webrtc_h  webrtc,
webrtc_state_e state 
)

Gets the WebRTC state.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
[out]stateWebRTC state
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
See also:
webrtc_set_state_changed_cb()
webrtc_unset_state_changed_cb()
int webrtc_get_stun_server ( webrtc_h  webrtc,
char **  stun_server 
)

Gets the STUN server URL.

Since :
6.5
Remarks:
The stun_server should be released using free().
Parameters:
[in]webrtcWebRTC handle
[out]stun_serverThe STUN server URL
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter

Sets a bundle policy.

Since :
7.0
Parameters:
[in]webrtcWebRTC handle
[in]policyThe bundle policy
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
See also:
webrtc_get_bundle_policy()
int webrtc_set_error_cb ( webrtc_h  webrtc,
webrtc_error_cb  callback,
void *  user_data 
)

Sets a callback function to be invoked when an asynchronous operation error occurs.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
[in]callbackCallback function pointer
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
webrtc_error_cb() will be invoked.
See also:
webrtc_unset_error_cb()
webrtc_error_cb()
int webrtc_set_ice_candidate_cb ( webrtc_h  webrtc,
webrtc_ice_candidate_cb  callback,
void *  user_data 
)

Sets an ICE candidate callback function to be invoked when the WebRTC needs to send the ICE candidate message to the remote peer.

Since :
6.5
Remarks:
If all the ICE candidates have been gathered, ICE gathering state will be changed to WEBRTC_ICE_GATHERING_STATE_COMPLETE.
The registered callback will be invoked in an internal thread of the webrtc.
Parameters:
[in]webrtcWebRTC handle
[in]callbackCallback function pointer
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
Postcondition:
webrtc_ice_candidate_cb() will be invoked.
See also:
webrtc_unset_ice_candidate_cb()
webrtc_ice_candidate_cb()
webrtc_set_ice_gathering_state_change_cb()
webrtc_get_ice_gathering_state()

Sets a callback function to be invoked when the WebRTC ICE connection state is changed.

Since :
6.5
Remarks:
The registered callback will be invoked in the main thread.
Parameters:
[in]webrtcWebRTC handle
[in]callbackCallback function pointer
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
Postcondition:
webrtc_ice_connection_state_change_cb() will be invoked.
See also:
webrtc_unset_ice_connection_state_change_cb()
webrtc_ice_connection_state_change_cb()
webrtc_get_ice_connection_state()

Sets a callback function to be invoked when the WebRTC ICE gathering state is changed.

Since :
6.5
Remarks:
The registered callback will be invoked in the main thread.
Parameters:
[in]webrtcWebRTC handle
[in]callbackCallback function pointer
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
Postcondition:
webrtc_ice_gathering_state_change_cb() will be invoked.
See also:
webrtc_unset_ice_gathering_state_change_cb()
webrtc_ice_gathering_state_change_cb()
webrtc_get_ice_gathering_state()

Sets a ICE transport policy that represents which candidates the ICE Agent is allowed to use.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
[in]policyThe ICE transport policy
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
See also:
webrtc_get_ice_transport_policy()
int webrtc_set_local_description ( webrtc_h  webrtc,
const char *  description 
)

Sets the session description for a local peer associated with a WebRTC connection.

Since :
6.5
Remarks:
description is a JSON string.
It will be {"sdp":{"type":"offer or answer","sdp":"..."}}.
Parameters:
[in]webrtcWebRTC handle
[in]descriptionThe local session description
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_NEGOTIATING.
See also:
webrtc_create_offer()
webrtc_create_offer_async()
webrtc_create_answer()
webrtc_create_answer_async()
webrtc_set_signaling_state_change_cb()
webrtc_get_signaling_state()
int webrtc_set_negotiation_needed_cb ( webrtc_h  webrtc,
webrtc_negotiation_needed_cb  callback,
void *  user_data 
)

Sets a negotiation needed callback function to be invoked when a change has occurred which requires session negotiation.

Since :
6.5
Remarks:
The registered callback will be invoked in an internal thread of the webrtc.
Parameters:
[in]webrtcWebRTC handle
[in]callbackCallback function pointer
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
Postcondition:
webrtc_negotiation_needed_cb() will be invoked.
See also:
webrtc_unset_negotiation_needed_cb()
webrtc_negotiation_needed_cb()

Sets a callback function to be invoked when the WebRTC peer connection state is changed.

Since :
6.5
Remarks:
The registered callback will be invoked in the main thread.
Parameters:
[in]webrtcWebRTC handle
[in]callbackCallback function pointer
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
Postcondition:
webrtc_peer_connection_state_change_cb() will be invoked.
See also:
webrtc_unset_peer_connection_state_change_cb()
webrtc_peer_connection_state_change_cb()
webrtc_get_peer_connection_state()
int webrtc_set_remote_description ( webrtc_h  webrtc,
const char *  description 
)

Sets the session description of the remote peer's current offer or answer.

Since :
6.5
Remarks:
description is a JSON string.
It will be {"sdp":{"type":"offer or answer","sdp":"..."}}.
Parameters:
[in]webrtcWebRTC handle
[in]descriptionThe remote session description
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_NEGOTIATING.
See also:
webrtc_state_changed_cb()
webrtc_set_signaling_state_change_cb()
webrtc_get_signaling_state()
int webrtc_set_signaling_state_change_cb ( webrtc_h  webrtc,
webrtc_signaling_state_change_cb  callback,
void *  user_data 
)

Sets a callback function to be invoked when the WebRTC signaling state is changed.

Since :
6.5
Remarks:
The registered callback will be invoked in the main thread.
Parameters:
[in]webrtcWebRTC handle
[in]callbackCallback function pointer
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
Postcondition:
webrtc_signaling_state_change_cb() will be invoked.
See also:
webrtc_unset_signaling_state_change_cb()
webrtc_signaling_state_change_cb()
webrtc_get_signaling_state()
int webrtc_set_state_changed_cb ( webrtc_h  webrtc,
webrtc_state_changed_cb  callback,
void *  user_data 
)

Sets a callback function to be invoked when the WebRTC state is changed.

Since :
6.5
Remarks:
The registered callback will be invoked in the main thread.
Parameters:
[in]webrtcWebRTC handle
[in]callbackCallback function pointer
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
webrtc_state_changed_cb() will be invoked.
See also:
webrtc_unset_state_changed_cb()
webrtc_state_changed_cb()
webrtc_get_state()
webrtc_create_offer()
webrtc_create_offer_async()
int webrtc_set_stun_server ( webrtc_h  webrtc,
const char *  stun_server 
)

Sets a STUN server URL.

Since :
6.5
Remarks:
Regarding STUN, refer to the RFC7064(https://tools.ietf.org/html/rfc7064).
Parameters:
[in]webrtcWebRTC handle
[in]stun_serverThe STUN server URL of the form stun://host:port
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
int webrtc_set_track_added_cb ( webrtc_h  webrtc,
webrtc_track_added_cb  callback,
void *  user_data 
)

Sets a track added callback function to be invoked when a new track has been added to the WebRTC.

Since :
6.5
Remarks:
The registered callback will be invoked in an internal thread of the webrtc.
Parameters:
[in]webrtcWebRTC handle
[in]callbackCallback function pointer
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE or WEBRTC_STATE_NEGOTIATING.
Postcondition:
webrtc_track_added_cb() will be invoked.
See also:
webrtc_unset_track_added_cb()
webrtc_track_added_cb()
int webrtc_start ( webrtc_h  webrtc)

Starts the WebRTC.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
WEBRTC_ERROR_INVALID_STATEInvalid state
WEBRTC_ERROR_RESOURCE_FAILEDResource failed
Precondition:
webrtc_ice_candidate_cb() must be set by calling webrtc_set_ice_candidate_cb().
webrtc_media_packet_source_set_format() must be called if webrtc has a media packet source.
webrtc state must be set to WEBRTC_STATE_IDLE.
Postcondition:
webrtc state will be WEBRTC_STATE_NEGOTIATING.
See also:
webrtc_create()
webrtc_stop()
int webrtc_stop ( webrtc_h  webrtc)

Stops the WebRTC.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_STATEInvalid state
WEBRTC_ERROR_RESOURCE_FAILEDResource failed
Precondition:
webrtc state must be set to WEBRTC_STATE_NEGOTIATING or WEBRTC_STATE_PLAYING.
Postcondition:
webrtc state will be WEBRTC_STATE_IDLE.
See also:
webrtc_create()
webrtc_start()

Unsets the error callback function.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
See also:
webrtc_set_error_cb()

Unsets the ice candidate callback function.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
See also:
webrtc_set_ice_candidate_cb()

Unsets the ICE connection state change callback function.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
See also:
webrtc_set_ice_connection_state_change_cb()
webrtc_get_ice_connection_state()

Unsets the ICE gathering state change callback function.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
See also:
webrtc_set_ice_gathering_state_change_cb()
webrtc_get_ice_gathering_state()

Unsets the negotiation needed callback function.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
WEBRTC_ERROR_INVALID_STATEInvalid state
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
See also:
webrtc_set_negotiation_needed_cb()

Unsets the peer connection state change callback function.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
See also:
webrtc_set_peer_connection_state_change_cb()
webrtc_get_peer_connection_state()

Unsets the signaling state change callback function.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
webrtc state must be set to WEBRTC_STATE_IDLE.
See also:
webrtc_set_signaling_state_change_cb()
webrtc_get_signaling_state()

Unsets the state changed callback function.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
See also:
webrtc_set_state_changed_cb()

Unsets the track added callback function.

Since :
6.5
Parameters:
[in]webrtcWebRTC handle
Returns:
0 on success, otherwise a negative error value
Return values:
WEBRTC_ERROR_NONESuccessful
WEBRTC_ERROR_INVALID_PARAMETERInvalid parameter
WEBRTC_ERROR_INVALID_OPERATIONInvalid operation
See also:
webrtc_set_track_added_cb()