* 'max-retransmits' of type int : The number of times data will be attempted to be transmitted without acknowledgement before dropping. The default value is -1.\n
* 'protocol' of type string : The subprotocol used by this channel. The default value is NULL.\n
* 'id' of type int : Override the default identifier selection of this channel. The default value is -1.\n
- * 'priority' of type int : The priority to use for this channel(1:very low, 2:low, 3:medium, 4:high). The default value is 2.
+ * 'priority' of type int : The priority to use for this channel(1:very low, 2:low, 3:medium, 4:high). The default value is 2.\n
+ * #WEBRTC_ERROR_INVALID_STATE will no longer occur. (Since 9.0)
* @param[in] webrtc WebRTC handle
* @param[in] label Name for the channel
* @param[in] options Configuration options for creating the data channel (optional, this can be NULL)
* @retval #WEBRTC_ERROR_NONE Successful
* @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
- * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
* @see webrtc_destroy_data_channel()
*/
int webrtc_create_data_channel(webrtc_h webrtc, const char *label, bundle *options, webrtc_data_channel_h *channel);
locker = g_mutex_locker_new(&_webrtc->mutex);
- RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
return _create_data_channel(webrtc, label, options, (webrtc_data_channel_s **)channel);
}