@stream-io/video-client 1.60.0 → 1.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/index.browser.es.js +253 -55
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +253 -54
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +253 -55
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +11 -5
- package/dist/src/rtc/Publisher.d.ts +18 -0
- package/dist/src/rtc/TransceiverCache.d.ts +10 -0
- package/dist/src/rtc/e2ee/E2EEManager.d.ts +10 -1
- package/dist/src/types.d.ts +30 -1
- package/index.ts +1 -0
- package/package.json +1 -1
- package/src/Call.ts +180 -48
- package/src/__tests__/Call.lifecycle.test.ts +479 -9
- package/src/__tests__/Call.ringingLifecycle.test.ts +242 -0
- package/src/rtc/Publisher.ts +66 -12
- package/src/rtc/TransceiverCache.ts +17 -0
- package/src/rtc/__tests__/Publisher.test.ts +209 -0
- package/src/rtc/__tests__/mocks/webrtc.mocks.ts +1 -0
- package/src/rtc/e2ee/E2EEManager.ts +10 -1
- package/src/rtc/e2ee/EncryptionManager.ts +1 -1
- package/src/rtc/e2ee/SPEC.md +1 -1
- package/src/types.ts +37 -1
package/src/types.ts
CHANGED
|
@@ -458,7 +458,17 @@ type StreamRNVideoSDKEndCallReason =
|
|
|
458
458
|
| 'unknown';
|
|
459
459
|
|
|
460
460
|
type StreamRNVideoSDKCallingX = {
|
|
461
|
-
|
|
461
|
+
/**
|
|
462
|
+
* @param isCancelled - polled around the bridge's waits: registration is
|
|
463
|
+
* skipped, or undone, when it returns true. Supplied by the join attempt
|
|
464
|
+
* because the call's own state cannot distinguish a fresh join starting
|
|
465
|
+
* from `LEFT` from an abandoned one that reached `LEFT` while waiting.
|
|
466
|
+
*/
|
|
467
|
+
joinCall: (
|
|
468
|
+
call: Call,
|
|
469
|
+
activeCalls: Call[],
|
|
470
|
+
isCancelled?: () => boolean,
|
|
471
|
+
) => Promise<void>;
|
|
462
472
|
endCall: (
|
|
463
473
|
call: Call,
|
|
464
474
|
reason?: StreamRNVideoSDKEndCallReason,
|
|
@@ -468,8 +478,34 @@ type StreamRNVideoSDKCallingX = {
|
|
|
468
478
|
unwireAudioEngineSubscription: () => void;
|
|
469
479
|
};
|
|
470
480
|
|
|
481
|
+
/**
|
|
482
|
+
* React Native's preparation and cleanup for a ringing call's join.
|
|
483
|
+
*
|
|
484
|
+
* A ringing call is joined by the SDK rather than by app code, so there is no
|
|
485
|
+
* point at which the app holds the call and can still set it up. These are that
|
|
486
|
+
* point, and the matching release.
|
|
487
|
+
*/
|
|
488
|
+
type StreamRNVideoSDKRingingCallLifecycle = {
|
|
489
|
+
/**
|
|
490
|
+
* Runs the app's pre-join setup and resolves once it is done, bounded by a
|
|
491
|
+
* deadline. Rejecting fails the join closed rather than joining with nothing
|
|
492
|
+
* installed.
|
|
493
|
+
*/
|
|
494
|
+
beforeJoin: (call: Call) => Promise<void>;
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* The join failed terminally. Ends the ringing flow and releases what the
|
|
498
|
+
* setup installed. Never rejects, so the original join error survives.
|
|
499
|
+
*/
|
|
500
|
+
onJoinFailed: (call: Call) => Promise<void>;
|
|
501
|
+
|
|
502
|
+
/** The call has ended; release whatever the pre-join hook installed. */
|
|
503
|
+
onLeave: (call: Call) => void;
|
|
504
|
+
};
|
|
505
|
+
|
|
471
506
|
export type StreamRNVideoSDKGlobals = {
|
|
472
507
|
callingX: StreamRNVideoSDKCallingX;
|
|
508
|
+
ringingCallLifecycle: StreamRNVideoSDKRingingCallLifecycle;
|
|
473
509
|
callManager: {
|
|
474
510
|
/**
|
|
475
511
|
* Sets up the in call manager.
|