You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: DOC.md
+21-3
Original file line number
Diff line number
Diff line change
@@ -207,7 +207,9 @@ Initiates the handshake process. Following this call, the local description call
207
207
Arguments:
208
208
209
209
-`pc`: the Peer Connection identifier
210
-
-`type` (optional): type of the description ("offer", "answer", "pranswer", or "rollback") or NULL for autodetection.
210
+
-`type` (optional): type of the description ("offer", "answer", "pranswer", or "rollback") or NULL for automatic (recommended).
211
+
212
+
Warning: This function expects the optional type for the local description and not an SDP description. It is not possible to set an existing SDP description.
211
213
212
214
#### rtcSetRemoteDescription
213
215
@@ -220,7 +222,7 @@ Sets the remote description received from the remote peer by the user's method o
220
222
Arguments:
221
223
222
224
-`pc`: the Peer Connection identifier
223
-
-`type` (optional): type of the description ("offer", "answer", "pranswer", or "rollback") or NULL for autodetection.
225
+
-`type` (optional): type of the description ("offer", "answer", "pranswer", or "rollback") or NULL for automatic (not recommended).
224
226
225
227
If the remote description is an offer and `disableAutoNegotiation` was not set in `rtcConfiguration`, the library will automatically answer by calling `rtcSetLocalDescription` internally. Otherwise, the user must call it to answer the remote description.
226
228
@@ -296,7 +298,7 @@ Return value: the length of the string copied in buffer (including the terminati
296
298
297
299
If `buffer` is `NULL`, the description is not copied but the size is still returned.
298
300
299
-
#### rtcGetRemoteDescription
301
+
#### rtcGetRemoteDescriptionType
300
302
301
303
```
302
304
int rtcGetRemoteDescriptionType(int pc, char *buffer, int size)
@@ -314,6 +316,22 @@ Return value: the length of the string copied in buffer (including the terminati
314
316
315
317
If `buffer` is `NULL`, the description is not copied but the size is still returned.
316
318
319
+
#### rtcCreateOffer/rtcCreateAnswer
320
+
321
+
```
322
+
int rtcCreateOffer(int pc, char *buffer, int size)
323
+
int rtcCreateAnswer(int pc, char *buffer, int size)
324
+
```
325
+
326
+
Create a local offer or answer description in SDP format. These functions are intended only for specific use cases where the application needs to generate a description without setting it. It is useless to call them before `rtcSetLocalDescription` as it doesn't expect the user to supply a description.
327
+
328
+
-`pc`: the Peer Connection identifier
329
+
-`buffer`: a user-supplied buffer to store the description
330
+
-`size`: the size of `buffer`
331
+
332
+
Return value: the length of the string copied in buffer (including the terminating null character) or a negative error code
333
+
334
+
If `buffer` is `NULL`, the description is not copied but the size is still returned.
Copy file name to clipboardexpand all lines: pages/content/pages/reference.md
+21-3
Original file line number
Diff line number
Diff line change
@@ -210,7 +210,9 @@ Initiates the handshake process. Following this call, the local description call
210
210
Arguments:
211
211
212
212
-`pc`: the Peer Connection identifier
213
-
-`type` (optional): type of the description ("offer", "answer", "pranswer", or "rollback") or NULL for autodetection.
213
+
-`type` (optional): type of the description ("offer", "answer", "pranswer", or "rollback") or NULL for automatic (recommended).
214
+
215
+
Warning: This function expects the optional type for the local description and not an SDP description. It is not possible to set an existing SDP description.
214
216
215
217
#### rtcSetRemoteDescription
216
218
@@ -223,7 +225,7 @@ Sets the remote description received from the remote peer by the user's method o
223
225
Arguments:
224
226
225
227
-`pc`: the Peer Connection identifier
226
-
-`type` (optional): type of the description ("offer", "answer", "pranswer", or "rollback") or NULL for autodetection.
228
+
-`type` (optional): type of the description ("offer", "answer", "pranswer", or "rollback") or NULL for automatic (not recommended).
227
229
228
230
If the remote description is an offer and `disableAutoNegotiation` was not set in `rtcConfiguration`, the library will automatically answer by calling `rtcSetLocalDescription` internally. Otherwise, the user must call it to answer the remote description.
229
231
@@ -299,7 +301,7 @@ Return value: the length of the string copied in buffer (including the terminati
299
301
300
302
If `buffer` is `NULL`, the description is not copied but the size is still returned.
301
303
302
-
#### rtcGetRemoteDescription
304
+
#### rtcGetRemoteDescriptionType
303
305
304
306
```
305
307
int rtcGetRemoteDescriptionType(int pc, char *buffer, int size)
@@ -317,6 +319,22 @@ Return value: the length of the string copied in buffer (including the terminati
317
319
318
320
If `buffer` is `NULL`, the description is not copied but the size is still returned.
319
321
322
+
#### rtcCreateOffer/rtcCreateAnswer
323
+
324
+
```
325
+
int rtcCreateOffer(int pc, char *buffer, int size)
326
+
int rtcCreateAnswer(int pc, char *buffer, int size)
327
+
```
328
+
329
+
Create a local offer or answer description in SDP format. These functions are intended only for specific use cases where the application needs to generate a description without setting it. It is useless to call them before `rtcSetLocalDescription` as it doesn't expect the user to supply a description.
330
+
331
+
-`pc`: the Peer Connection identifier
332
+
-`buffer`: a user-supplied buffer to store the description
333
+
-`size`: the size of `buffer`
334
+
335
+
Return value: the length of the string copied in buffer (including the terminating null character) or a negative error code
336
+
337
+
If `buffer` is `NULL`, the description is not copied but the size is still returned.
0 commit comments