|
1 | 1 | openapi: 3.0.0 |
2 | 2 | info: |
3 | 3 | title: Cloudflare Calls API |
4 | | - version: "1.0" |
| 4 | + version: "1.1" |
5 | 5 | externalDocs: |
6 | 6 | description: Find out more about Cloudflare Calls |
7 | 7 | url: https://developers.cloudflare.com/calls/ |
@@ -135,6 +135,33 @@ paths: |
135 | 135 | sessionId: 2a45361d5fd7cc14eface0587c276c94 |
136 | 136 | trackName: generated-audio |
137 | 137 | kind: "audio" |
| 138 | + simulcast_track: |
| 139 | + description: Share a track with simulcast configuration |
| 140 | + value: |
| 141 | + sessionDescription: |
| 142 | + sdp: | |
| 143 | + v=0 |
| 144 | + o=- 0 0 IN IP4 127.0.0.1 |
| 145 | + s=- |
| 146 | + c=IN IP4 127.0.0.1 |
| 147 | + t=0 0 |
| 148 | + m=audio 4000 RTP/AVP 111 |
| 149 | + a=rtpmap:111 OPUS/48000/2 |
| 150 | + m=video 4002 RTP/AVP 96 |
| 151 | + a=rtpmap:96 VP8/90000 |
| 152 | + a=simulcast:send f;h;q |
| 153 | + a=rid:f send |
| 154 | + a=rid:h send |
| 155 | + a=rid:q send |
| 156 | + ... |
| 157 | + type: offer |
| 158 | + tracks: |
| 159 | + - location: local |
| 160 | + trackName: simulcast-video-track |
| 161 | + mid: "1" |
| 162 | + simulcast: |
| 163 | + preferredRid: "h" |
| 164 | + preferredRidNotAvailable: "leastbandwidth" |
138 | 165 | security: |
139 | 166 | - secret: [] |
140 | 167 | parameters: |
@@ -324,6 +351,75 @@ paths: |
324 | 351 | requiresImmediateRenegotiation: false |
325 | 352 | tracks: |
326 | 353 | - mid: "7" |
| 354 | + /apps/{appId}/sessions/{sessionId}/tracks/change: |
| 355 | + post: |
| 356 | + tags: |
| 357 | + - Change tracks |
| 358 | + summary: Change tracks by reusing existing transceivers |
| 359 | + requestBody: |
| 360 | + content: |
| 361 | + application/json: |
| 362 | + schema: |
| 363 | + $ref: "#/components/schemas/ChangeTracksRequest" |
| 364 | + examples: |
| 365 | + reuse_transceiver: |
| 366 | + description: Reuse an existing transceiver for a new track |
| 367 | + value: |
| 368 | + tracks: |
| 369 | + some-track-name: |
| 370 | + location: "remote" |
| 371 | + sessionId: "2a45361d5fd7cc14eface0587c276c94" |
| 372 | + trackName: "other-track-name" |
| 373 | + mid: "7" |
| 374 | + reuse_with_simulcast: |
| 375 | + description: Reuse an existing transceiver with simulcast preferences |
| 376 | + value: |
| 377 | + tracks: |
| 378 | + trackID2: |
| 379 | + location: "remote" |
| 380 | + sessionId: "2a45361d5fd7cc14eface0587c276c94" |
| 381 | + trackName: "simulcast-track" |
| 382 | + mid: "8" |
| 383 | + simulcast: |
| 384 | + preferredRid: "h" |
| 385 | + preferredRidNotAvailable: "leastbandwidth" |
| 386 | + security: |
| 387 | + - secret: [] |
| 388 | + parameters: |
| 389 | + - in: path |
| 390 | + name: appId |
| 391 | + schema: |
| 392 | + type: string |
| 393 | + required: true |
| 394 | + description: WebRTC application ID |
| 395 | + - in: path |
| 396 | + name: sessionId |
| 397 | + schema: |
| 398 | + type: string |
| 399 | + required: true |
| 400 | + description: Current PeerConnection session ID |
| 401 | + responses: |
| 402 | + "200": |
| 403 | + description: OK |
| 404 | + headers: |
| 405 | + vary: |
| 406 | + schema: |
| 407 | + type: string |
| 408 | + example: Origin |
| 409 | + content: |
| 410 | + application/json: |
| 411 | + schema: |
| 412 | + $ref: "#/components/schemas/ChangeTracksResponse" |
| 413 | + examples: |
| 414 | + success: |
| 415 | + value: |
| 416 | + requiresImmediateRenegotiation: false |
| 417 | + tracks: |
| 418 | + trackID1: |
| 419 | + mid: "7" |
| 420 | + sessionId: "2a45361d5fd7cc14eface0587c276c94" |
| 421 | + trackName: "new-track-name" |
| 422 | + |
327 | 423 | /apps/{appId}/sessions/{sessionId}: |
328 | 424 | get: |
329 | 425 | tags: |
@@ -407,6 +503,21 @@ components: |
407 | 503 | kind: |
408 | 504 | type: string |
409 | 505 | description: Give a hint to the SFU about the transceiver kind. This is required when the SFU generates the offer |
| 506 | + simulcast: |
| 507 | + type: object |
| 508 | + description: Simulcast configuration for the track |
| 509 | + properties: |
| 510 | + preferredRid: |
| 511 | + type: string |
| 512 | + description: Preferred RID (Resolution ID) for simulcast streams |
| 513 | + preferredRidNotAvailable: |
| 514 | + type: string |
| 515 | + enum: |
| 516 | + - leastbandwidth |
| 517 | + - none |
| 518 | + - error |
| 519 | + default: leastbandwidth |
| 520 | + description: Fallback strategy when preferred RID is not available anymore from the remote peer |
410 | 521 | CloseTrackObject: |
411 | 522 | type: object |
412 | 523 | properties: |
@@ -538,3 +649,34 @@ components: |
538 | 649 | type: string |
539 | 650 | sessionDescription: |
540 | 651 | $ref: "#/components/schemas/SessionDescription" |
| 652 | + ChangeTracksRequest: |
| 653 | + type: object |
| 654 | + properties: |
| 655 | + tracks: |
| 656 | + type: object |
| 657 | + additionalProperties: |
| 658 | + allOf: |
| 659 | + - $ref: "#/components/schemas/TrackObject" |
| 660 | + description: Map of track IDs to track objects for changing tracks |
| 661 | + sessionDescription: |
| 662 | + $ref: "#/components/schemas/SessionDescription" |
| 663 | + ChangeTracksResponse: |
| 664 | + type: object |
| 665 | + properties: |
| 666 | + errorCode: |
| 667 | + type: string |
| 668 | + errorDescription: |
| 669 | + type: string |
| 670 | + requiresImmediateRenegotiation: |
| 671 | + type: boolean |
| 672 | + tracks: |
| 673 | + type: object |
| 674 | + additionalProperties: |
| 675 | + allOf: |
| 676 | + - $ref: "#/components/schemas/TrackObject" |
| 677 | + - properties: |
| 678 | + errorCode: |
| 679 | + type: string |
| 680 | + errorDescription: |
| 681 | + type: string |
| 682 | + description: Map of track IDs to track objects with results |
0 commit comments