@stream-io/video-react-native-sdk 1.43.0 → 1.44.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 +22 -1
- package/dist/commonjs/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
- package/dist/commonjs/components/Call/Lobby/Lobby.js +4 -9
- package/dist/commonjs/components/Call/Lobby/Lobby.js.map +1 -1
- package/dist/commonjs/components/Call/Lobby/LobbyCameraPreview.js +93 -0
- package/dist/commonjs/components/Call/Lobby/LobbyCameraPreview.js.map +1 -0
- package/dist/commonjs/components/Call/Lobby/index.js +11 -0
- package/dist/commonjs/components/Call/Lobby/index.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js +4 -15
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js.map +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/index.js +10 -4
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/index.js.map +1 -1
- package/dist/commonjs/modules/call-manager/CallManager.js +37 -54
- package/dist/commonjs/modules/call-manager/CallManager.js.map +1 -1
- package/dist/commonjs/utils/internal/callingx/callingx.js +26 -37
- package/dist/commonjs/utils/internal/callingx/callingx.js.map +1 -1
- package/dist/commonjs/utils/internal/registerMediaEngine.js +41 -0
- package/dist/commonjs/utils/internal/registerMediaEngine.js.map +1 -0
- package/dist/commonjs/utils/internal/registerSDKGlobals.js +93 -35
- package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/commonjs/utils/push/android.js +6 -8
- package/dist/commonjs/utils/push/android.js.map +1 -1
- package/dist/commonjs/utils/push/libs/firebaseMessaging/index.js +0 -9
- package/dist/commonjs/utils/push/libs/firebaseMessaging/index.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
- package/dist/module/components/Call/Lobby/Lobby.js +4 -9
- package/dist/module/components/Call/Lobby/Lobby.js.map +1 -1
- package/dist/module/components/Call/Lobby/LobbyCameraPreview.js +87 -0
- package/dist/module/components/Call/Lobby/LobbyCameraPreview.js.map +1 -0
- package/dist/module/components/Call/Lobby/index.js +1 -0
- package/dist/module/components/Call/Lobby/index.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js +6 -17
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js.map +1 -1
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/index.js +11 -5
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/index.js.map +1 -1
- package/dist/module/modules/call-manager/CallManager.js +36 -53
- package/dist/module/modules/call-manager/CallManager.js.map +1 -1
- package/dist/module/utils/internal/callingx/callingx.js +25 -38
- package/dist/module/utils/internal/callingx/callingx.js.map +1 -1
- package/dist/module/utils/internal/registerMediaEngine.js +37 -0
- package/dist/module/utils/internal/registerMediaEngine.js.map +1 -0
- package/dist/module/utils/internal/registerSDKGlobals.js +95 -37
- package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/module/utils/push/android.js +7 -9
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/libs/firebaseMessaging/index.js +0 -8
- package/dist/module/utils/push/libs/firebaseMessaging/index.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/components/Call/Lobby/Lobby.d.ts.map +1 -1
- package/dist/typescript/components/Call/Lobby/LobbyCameraPreview.d.ts +28 -0
- package/dist/typescript/components/Call/Lobby/LobbyCameraPreview.d.ts.map +1 -0
- package/dist/typescript/components/Call/Lobby/index.d.ts +1 -0
- package/dist/typescript/components/Call/Lobby/index.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.d.ts +11 -6
- package/dist/typescript/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.d.ts.map +1 -1
- package/dist/typescript/components/Participant/ParticipantView/VideoRenderer/index.d.ts.map +1 -1
- package/dist/typescript/modules/call-manager/CallManager.d.ts +28 -6
- package/dist/typescript/modules/call-manager/CallManager.d.ts.map +1 -1
- package/dist/typescript/modules/call-manager/types.d.ts +0 -1
- package/dist/typescript/modules/call-manager/types.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/types.d.ts +3 -0
- package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
- package/dist/typescript/utils/internal/callingx/callingx.d.ts +2 -0
- package/dist/typescript/utils/internal/callingx/callingx.d.ts.map +1 -1
- package/dist/typescript/utils/internal/registerMediaEngine.d.ts +15 -0
- package/dist/typescript/utils/internal/registerMediaEngine.d.ts.map +1 -0
- package/dist/typescript/utils/internal/registerSDKGlobals.d.ts.map +1 -1
- package/dist/typescript/utils/push/android.d.ts.map +1 -1
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +0 -1
- package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/ios/StreamInCallManager.m +4 -0
- package/ios/StreamInCallManager.swift +42 -10
- package/package.json +8 -8
- package/src/components/Call/CallControls/internal/ReactionsPicker.tsx +2 -2
- package/src/components/Call/Lobby/Lobby.tsx +4 -11
- package/src/components/Call/Lobby/LobbyCameraPreview.tsx +99 -0
- package/src/components/Call/Lobby/index.ts +1 -0
- package/src/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.tsx +56 -75
- package/src/components/Participant/ParticipantView/VideoRenderer/index.tsx +18 -7
- package/src/modules/call-manager/CallManager.ts +40 -71
- package/src/modules/call-manager/native-module.d.ts +13 -0
- package/src/modules/call-manager/types.ts +0 -1
- package/src/utils/StreamVideoRN/types.ts +3 -0
- package/src/utils/internal/callingx/callingx.ts +35 -44
- package/src/utils/internal/registerMediaEngine.ts +42 -0
- package/src/utils/internal/registerSDKGlobals.ts +115 -42
- package/src/utils/push/android.ts +9 -17
- package/src/utils/push/libs/firebaseMessaging/index.ts +0 -19
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Participant/ParticipantView/VideoRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Participant/ParticipantView/VideoRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAI1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAyB/D;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,oBAAoB,EAClB,0BAA0B,GAC1B,WAAW,GACX,aAAa,GACb,WAAW,GACX,WAAW,GACX,aAAa,GACb,QAAQ,CACX,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,+IASrB,kBAAkB,uBAsMtB,CAAC"}
|
|
@@ -59,7 +59,23 @@ export declare class CallManager {
|
|
|
59
59
|
ios: IOSCallManager;
|
|
60
60
|
speaker: SpeakerManager;
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* The audio config recorded via {@link start}. The SDK's internal call manager reads it at the
|
|
63
|
+
* next join-time start and applies it before the native audio manager is activated.
|
|
64
|
+
*/
|
|
65
|
+
private storedConfig?;
|
|
66
|
+
/**
|
|
67
|
+
* The config recorded via {@link start}.
|
|
68
|
+
*
|
|
69
|
+
* @internal Read by the SDK's internal call manager at join; not intended for app use.
|
|
70
|
+
*/
|
|
71
|
+
getStoredConfig: () => StreamInCallManagerConfig | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Records the desired audio config for the call.
|
|
74
|
+
*
|
|
75
|
+
* This does NOT start the native audio manager — the SDK owns native start/stop and applies this
|
|
76
|
+
* config at the next join-time start (before the audio manager is activated). Call it **before**
|
|
77
|
+
* joining. Calling it mid-call only updates the stored config; it does not change the running
|
|
78
|
+
* call's audio, and the new config takes effect on the next call/rejoin.
|
|
63
79
|
*
|
|
64
80
|
* @param config.audioRole The audio role to set. It can be one of the following:
|
|
65
81
|
* - `'communicator'`: (Default) For use cases like video or voice calls.
|
|
@@ -69,24 +85,30 @@ export declare class CallManager {
|
|
|
69
85
|
* It prioritizes high-quality stereo audio streaming.
|
|
70
86
|
* Audio routing is controlled by the OS, and manual switching is not supported.
|
|
71
87
|
*
|
|
72
|
-
* @param config.deviceEndpointType
|
|
73
|
-
*
|
|
88
|
+
* @param config.deviceEndpointType Overrides the default audio device endpoint. When omitted,
|
|
89
|
+
* the SDK uses the device derived from the call settings. It can be one of the following:
|
|
90
|
+
* - `'speaker'`: For normal video or voice calls.
|
|
74
91
|
* - `'earpiece'`: For voice-only mobile call type scenarios.
|
|
75
|
-
*
|
|
76
|
-
* @param config.enableStereoAudioOutput Whether to enable stereo audio output. Only supported for listener audio role.
|
|
77
92
|
*/
|
|
78
93
|
start: (config?: StreamInCallManagerConfig) => void;
|
|
79
94
|
/**
|
|
80
|
-
*
|
|
95
|
+
* Clears the stored audio config.
|
|
81
96
|
*/
|
|
82
97
|
stop: () => void;
|
|
83
98
|
/**
|
|
84
99
|
* For debugging purposes, will emit a log event with the current audio state.
|
|
85
100
|
* in the native layer.
|
|
101
|
+
*
|
|
102
|
+
* NOTE: This method might be called outside of the call JOIN/LEFT window,
|
|
103
|
+
* so it may lead to default peer connection factory and adm being created.
|
|
86
104
|
*/
|
|
87
105
|
logAudioState: () => void;
|
|
88
106
|
/**
|
|
89
107
|
* For debugging purposes, returns the current audio state as a string.
|
|
108
|
+
*
|
|
109
|
+
* NOTE: This method might be called outside of the call JOIN/LEFT window,
|
|
110
|
+
* so it may lead to default peer connection factory and adm being created.
|
|
111
|
+
*
|
|
90
112
|
* @returns A string containing the current audio state information.
|
|
91
113
|
*/
|
|
92
114
|
getAudioStateLog: () => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallManager.d.ts","sourceRoot":"","sources":["../../../../src/modules/call-manager/CallManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AA+FjB;;GAEG;AACH,cAAM,mBAAmB;IACvB,OAAO,CAAC,YAAY,CAAC,CAAqB;IAC1C,OAAO,CAAC,yBAAyB,CAAS;IAE1C;;;;;;OAMG;IACH,OAAO,CAAC,0BAA0B,CAWhC;IAEF;;;OAGG;IACH,SAAS,QAAa,OAAO,CAAC,iBAAiB,CAAC,CAQ9C;IAEF;;;;OAIG;IACH,MAAM,GAAI,UAAU,MAAM,KAAG,IAAI,CAoB/B;IAEF;;;;OAIG;IACH,iBAAiB,GACf,UAAU,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,KAC3C,CAAC,MAAM,IAAI,CAAC,CAsCb;CACH;AAED,cAAM,cAAc;IAClB,OAAO,CAAC,YAAY,CAAC,CAAqB;IAE1C;;OAEG;IACH,kBAAkB,QAAO,IAAI,CAG3B;IAEF;;;;OAIG;IACH,4BAA4B,GAC1B,gBAAgB,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,KACzD,CAAC,MAAM,IAAI,CAAC,CAQb;CACH;AAED,cAAM,cAAc;IAClB;;OAEG;IACH,OAAO,GAAI,MAAM,OAAO,KAAG,IAAI,CAM7B;IAEF;;OAEG;IACH,sBAAsB,GAAI,OAAO,OAAO,KAAG,IAAI,CAkC7C;CACH;
|
|
1
|
+
{"version":3,"file":"CallManager.d.ts","sourceRoot":"","sources":["../../../../src/modules/call-manager/CallManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AA+FjB;;GAEG;AACH,cAAM,mBAAmB;IACvB,OAAO,CAAC,YAAY,CAAC,CAAqB;IAC1C,OAAO,CAAC,yBAAyB,CAAS;IAE1C;;;;;;OAMG;IACH,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C,CAAC;AAElB;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,0FAA0F;IAC1F,EAAE,EAAE,MAAM,CAAC;IACX,0GAA0G;IAC1G,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,IAAI,EAAE,uBAAuB,CAAC;CAC/B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,8CAA8C;IAC9C,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8CAA8C;IAC9C,mBAAmB,EAAE,uBAAuB,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG,UAAU,CAAC;AACpD,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,UAAU,CAAC;AAExD,MAAM,MAAM,yBAAyB,GAAG;IACtC,MAAM,EAAE,aAAa,GAAG,UAAU,CAAC;IACnC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC7E,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GACjC;IACE,SAAS,EAAE,cAAc,CAAC;IAC1B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,GACD;IACE,SAAS,EAAE,UAAU,CAAC;CACvB,CAAC"}
|
|
@@ -17,6 +17,9 @@ export type StreamVideoConfig = {
|
|
|
17
17
|
* @default undefined
|
|
18
18
|
*/
|
|
19
19
|
push?: {
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Expo is auto-detected; this value is ignored and the property will be removed in a future major version.
|
|
22
|
+
*/
|
|
20
23
|
isExpo?: boolean;
|
|
21
24
|
/**
|
|
22
25
|
* The publish options to be used when joining a call from a push notification.
|
|
@@ -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;gBAClB,SAAS,CAAC,EAAE,MAAM,CAAC;gBACnB,SAAS,CAAC,EAAE,MAAM,CAAC;aACpB,CAAC;YACF;;eAEG;YACH,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,MAAM,CAAC;YACrE,kBAAkB,CAAC,EAAE,OAAO,CAAC;YAC7B;;;;eAIG;YACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;YACvC;;;eAGG;YACH,yBAAyB,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;SACpD,CAAC;QACF;;;WAGG;QACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;QACnC;;;;;;;;;;;;;;;;;WAiBG;QACH,uBAAuB,EAAE,MAAM,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC;KACvE,CAAC;IACF,iBAAiB,EAAE;QACjB,OAAO,EAAE;YACP;;eAEG;YACH,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,WAAW,CAAC,CAAC;YAC3D;;eAEG;YACH,iBAAiB,EAAE,iCAAiC,CAAC;YACrD;;;eAGG;YACH,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;SAC1C,CAAC;KACH,CAAC;CACH,CAAC"}
|
|
@@ -15,4 +15,6 @@ export declare function registerOutgoingCall(call: Call): Promise<void>;
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function joinCallingxCall(call: Call, activeCalls: Call[]): Promise<void>;
|
|
17
17
|
export declare function endCallingxCall(call: Call, reason?: EndCallReason): Promise<void>;
|
|
18
|
+
export declare function wireAudioEngineSubscription(): Promise<void>;
|
|
19
|
+
export declare function unwireAudioEngineSubscription(): void;
|
|
18
20
|
//# sourceMappingURL=callingx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callingx.d.ts","sourceRoot":"","sources":["../../../../../src/utils/internal/callingx/callingx.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,KAAK,EACV,IAAI,EACJ,cAAc,EACd,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"callingx.d.ts","sourceRoot":"","sources":["../../../../../src/utils/internal/callingx/callingx.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,KAAK,EACV,IAAI,EACJ,cAAc,EACd,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AAKjC;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,cAAc,EAAE,GAAG,SAAS,EACzC,YAAY,EAAE,sBAAsB,EAAE,GAAG,SAAS,EAClD,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,MAAM,CAgCR;AAaD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,IAAI,iBA+BpD;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,iBA0ErE;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,aAAa,iBAmBvE;AAED,wBAAsB,2BAA2B,kBAehD;AAED,wBAAgB,6BAA6B,SAe5C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers the React Native {@link CallMediaEngine} provider.
|
|
3
|
+
*
|
|
4
|
+
* Once registered, every `Call.ensureMediaFactory()` builds the call's native
|
|
5
|
+
* `PeerConnectionFactory` (with the call's audio configuration) and sets it as
|
|
6
|
+
* the single live factory. The WebRTC globals (`getUserMedia`/`getDisplayMedia`/
|
|
7
|
+
* `new RTCPeerConnection`) then resolve to it, so the call's tracks and peer
|
|
8
|
+
* connections are created with — and torn down with — that one native factory,
|
|
9
|
+
* which is what lets the call own its AudioDeviceModule. The engine itself only
|
|
10
|
+
* manages the factory lifecycle (`dispose` at leave).
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare function registerCallMediaEngine(): void;
|
|
15
|
+
//# sourceMappingURL=registerMediaEngine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerMediaEngine.d.ts","sourceRoot":"","sources":["../../../../src/utils/internal/registerMediaEngine.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,SAkBtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerSDKGlobals.d.ts","sourceRoot":"","sources":["../../../../src/utils/internal/registerSDKGlobals.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registerSDKGlobals.d.ts","sourceRoot":"","sources":["../../../../src/utils/internal/registerSDKGlobals.ts"],"names":[],"mappings":"AA8OA,wBAAgB,kBAAkB,SAMjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/android.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,
|
|
1
|
+
{"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../src/utils/push/android.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAElB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,KAAK,sBAAsB,EAA2B,MAAM,QAAQ,CAAC;AAO9E,KAAK,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAIzD,4BAA4B;AAC5B,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,IAAI,KAAK,IAAI,iBA4C1D;AAED;;;GAGG;AAEH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,sBAAsB,CAAC,aAAa,CAAC,MAAM,CAAC,kBAgOnD,CAAC"}
|
|
@@ -2,5 +2,4 @@ import { type Type } from './lib';
|
|
|
2
2
|
export type { FirebaseMessagingTypes } from '@react-native-firebase/messaging';
|
|
3
3
|
export type FirebaseMessagingType = Type;
|
|
4
4
|
export declare function getFirebaseMessagingLib(): FirebaseMessagingType;
|
|
5
|
-
export declare function getFirebaseMessagingLibNoThrow(isExpo: boolean): FirebaseMessagingType | undefined;
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/push/libs/firebaseMessaging/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/utils/push/libs/firebaseMessaging/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC;AAEvC,YAAY,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAKzC,wBAAgB,uBAAuB,IAAI,qBAAqB,CAQ/D"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "1.
|
|
1
|
+
export declare const version = "1.44.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -9,6 +9,10 @@ RCT_EXTERN_METHOD(setDefaultAudioDeviceEndpointType:(NSString *)endpointType)
|
|
|
9
9
|
|
|
10
10
|
RCT_EXTERN_METHOD(setEnableStereoAudioOutput:(BOOL)enable)
|
|
11
11
|
|
|
12
|
+
RCT_EXTERN_METHOD(setMuteMode:(NSInteger)mode)
|
|
13
|
+
|
|
14
|
+
RCT_EXTERN_METHOD(setRecordingAlwaysPreparedMode:(BOOL)enabled)
|
|
15
|
+
|
|
12
16
|
RCT_EXTERN_METHOD(setup)
|
|
13
17
|
|
|
14
18
|
RCT_EXTERN_METHOD(start)
|
|
@@ -124,7 +124,30 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
124
124
|
self.enableStereo = enabled
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
|
|
127
|
+
|
|
128
|
+
@objc(setMuteMode:)
|
|
129
|
+
func setMuteMode(mode: NSInteger) {
|
|
130
|
+
audioSessionQueue.async { [self] in
|
|
131
|
+
guard let adm = getAudioDeviceModule() else {
|
|
132
|
+
log("setMuteMode(\(mode)) skipped: no live call ADM")
|
|
133
|
+
return
|
|
134
|
+
}
|
|
135
|
+
let muteMode = RTCAudioEngineMuteMode(rawValue: mode) ?? .voiceProcessing
|
|
136
|
+
_ = adm.setMuteMode(muteMode)
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@objc(setRecordingAlwaysPreparedMode:)
|
|
141
|
+
func setRecordingAlwaysPreparedMode(enabled: Bool) {
|
|
142
|
+
audioSessionQueue.async { [self] in
|
|
143
|
+
guard let adm = getAudioDeviceModule() else {
|
|
144
|
+
log("setRecordingAlwaysPreparedMode(\(enabled)) skipped: no live call ADM")
|
|
145
|
+
return
|
|
146
|
+
}
|
|
147
|
+
_ = adm.setRecordingAlwaysPreparedMode(enabled)
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
128
151
|
/// Builds the audio config for the current role/device and sets it as WebRTC's default.
|
|
129
152
|
private func makeAudioConfiguration(for routing: OutputRouting?) -> RTCAudioSessionConfiguration {
|
|
130
153
|
let category: AVAudioSession.Category
|
|
@@ -199,11 +222,11 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
199
222
|
// This path (no CallKit) owns audio-session activation itself, so the
|
|
200
223
|
// engine must be allowed to start. Restores availability in case a
|
|
201
224
|
// prior CallKit call had gated it off.
|
|
202
|
-
_ = adm
|
|
225
|
+
_ = adm?.setEngineAvailability(.default)
|
|
203
226
|
|
|
204
227
|
// Stereo is listener-only and applies live. Cleared by stop()'s reset().
|
|
205
228
|
if callAudioRole == .listener && enableStereo {
|
|
206
|
-
adm
|
|
229
|
+
adm?.setStereoPlayoutPreference(true)
|
|
207
230
|
}
|
|
208
231
|
|
|
209
232
|
let rtcConfig = makeAudioConfiguration(for: selectedOutput)
|
|
@@ -228,7 +251,7 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
228
251
|
#if DEBUG
|
|
229
252
|
NSLog("%@","[StreamInCallManager][wireEngineSubscription]")
|
|
230
253
|
#endif
|
|
231
|
-
engineSubscription = adm
|
|
254
|
+
engineSubscription = adm?.publisher.sink { [weak self] event in
|
|
232
255
|
guard let self else { return }
|
|
233
256
|
self.audioSessionQueue.async {
|
|
234
257
|
switch event {
|
|
@@ -339,7 +362,7 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
339
362
|
// session.setActive(true) here.
|
|
340
363
|
do {
|
|
341
364
|
let adm = getAudioDeviceModule()
|
|
342
|
-
try adm
|
|
365
|
+
try adm?.setPlayout(true)
|
|
343
366
|
self.log("adm.setPlayout(true) done")
|
|
344
367
|
} catch {
|
|
345
368
|
// String(describing:) surfaces the real error code (see setup()).
|
|
@@ -357,7 +380,7 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
357
380
|
return
|
|
358
381
|
}
|
|
359
382
|
let adm = getAudioDeviceModule()
|
|
360
|
-
adm
|
|
383
|
+
adm?.reset()
|
|
361
384
|
clearOutputRouting()
|
|
362
385
|
// Deactivate directly: the .didDisableAudioEngine sink is async and we cancel it below.
|
|
363
386
|
applyConfigForEngineDisable()
|
|
@@ -603,7 +626,10 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
603
626
|
@objc(getAudioStateLog)
|
|
604
627
|
func getAudioStateLog() -> String {
|
|
605
628
|
let session = AVAudioSession.sharedInstance()
|
|
606
|
-
|
|
629
|
+
|
|
630
|
+
guard let adm = getAudioDeviceModule() else {
|
|
631
|
+
return "No audio device module found"
|
|
632
|
+
}
|
|
607
633
|
|
|
608
634
|
// WebRTC wraps AVAudioSession with RTCAudioSession; log its state as well.
|
|
609
635
|
let rtcSession = RTCAudioSession.sharedInstance()
|
|
@@ -798,7 +824,11 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
798
824
|
stereoRefreshWorkItem?.cancel()
|
|
799
825
|
// Create a new debounced work item
|
|
800
826
|
let workItem = DispatchWorkItem { [weak self] in
|
|
801
|
-
self?.getAudioDeviceModule()
|
|
827
|
+
guard let adm = self?.getAudioDeviceModule() else {
|
|
828
|
+
self?.log("Audio device module is not ready")
|
|
829
|
+
return
|
|
830
|
+
}
|
|
831
|
+
adm.refreshStereoPlayoutState()
|
|
802
832
|
self?.log("Executed debounced refreshStereoPlayoutState")
|
|
803
833
|
}
|
|
804
834
|
stereoRefreshWorkItem = workItem
|
|
@@ -863,12 +893,14 @@ class StreamInCallManager: RCTEventEmitter {
|
|
|
863
893
|
}
|
|
864
894
|
|
|
865
895
|
// MARK: - Helper Methods
|
|
866
|
-
private func getAudioDeviceModule() -> AudioDeviceModule {
|
|
896
|
+
private func getAudioDeviceModule() -> AudioDeviceModule? {
|
|
867
897
|
guard let webrtcModule = moduleRegistry?.module(forName: "WebRTCModule") as? WebRTCModule else {
|
|
868
898
|
fatalError("WebRTCModule is required but not registered with the module registry")
|
|
869
899
|
}
|
|
870
900
|
|
|
871
|
-
|
|
901
|
+
// Follow the live call's ADM; fall back to the default only when no call factory is
|
|
902
|
+
// active (bare-fork, or an in-call-manager op firing outside the join↔leave window).
|
|
903
|
+
return webrtcModule.currentAudioDeviceModuleOrNil()
|
|
872
904
|
}
|
|
873
905
|
|
|
874
906
|
private func getCurrentWindow() -> UIWindow? {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-native-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.44.0",
|
|
4
4
|
"description": "Stream Video SDK for React Native",
|
|
5
5
|
"author": "https://getstream.io",
|
|
6
6
|
"homepage": "https://getstream.io/video/docs/react-native/",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"!**/.*"
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@stream-io/video-client": "1.
|
|
56
|
-
"@stream-io/video-react-bindings": "1.
|
|
55
|
+
"@stream-io/video-client": "1.58.0",
|
|
56
|
+
"@stream-io/video-react-bindings": "1.20.0",
|
|
57
57
|
"intl-pluralrules": "2.0.1",
|
|
58
58
|
"react-native-url-polyfill": "^3.0.0",
|
|
59
59
|
"rxjs": "~7.8.2",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@react-native-firebase/messaging": ">=17.5.0",
|
|
66
66
|
"@stream-io/noise-cancellation-react-native": ">=0.1.0",
|
|
67
67
|
"@stream-io/react-native-callingx": ">=0.1.0",
|
|
68
|
-
"@stream-io/react-native-webrtc": "^145.
|
|
68
|
+
"@stream-io/react-native-webrtc": "^145.3.1",
|
|
69
69
|
"@stream-io/video-filters-react-native": ">=0.1.0",
|
|
70
70
|
"expo": ">=47.0.0",
|
|
71
71
|
"expo-notifications": "*",
|
|
@@ -117,11 +117,11 @@
|
|
|
117
117
|
"@react-native/babel-preset": "0.86.2",
|
|
118
118
|
"@react-native/jest-preset": "0.86.2",
|
|
119
119
|
"@react-native/metro-config": "0.86.2",
|
|
120
|
-
"@stream-io/noise-cancellation-react-native": "^0.
|
|
121
|
-
"@stream-io/react-native-callingx": "^0.
|
|
122
|
-
"@stream-io/react-native-webrtc": "145.
|
|
120
|
+
"@stream-io/noise-cancellation-react-native": "^0.11.0",
|
|
121
|
+
"@stream-io/react-native-callingx": "^0.10.0",
|
|
122
|
+
"@stream-io/react-native-webrtc": "145.3.1",
|
|
123
123
|
"@stream-io/typescript-config": "^0.0.0",
|
|
124
|
-
"@stream-io/video-filters-react-native": "^0.
|
|
124
|
+
"@stream-io/video-filters-react-native": "^0.16.0",
|
|
125
125
|
"@testing-library/jest-native": "^5.4.3",
|
|
126
126
|
"@testing-library/react-native": "13.3.3",
|
|
127
127
|
"@tsconfig/node18": "^18.2.6",
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from 'react-native';
|
|
9
9
|
import { useCall } from '@stream-io/video-react-bindings';
|
|
10
10
|
import {
|
|
11
|
-
type
|
|
11
|
+
type SendVideoReactionRequest,
|
|
12
12
|
videoLoggerSystem,
|
|
13
13
|
} from '@stream-io/video-client';
|
|
14
14
|
import { ComponentTestIds } from '../../../../constants/TestIds';
|
|
@@ -82,7 +82,7 @@ export const ReactionsPicker = ({
|
|
|
82
82
|
left: reactionsButtonLayoutRectangle?.x,
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
const onClose = (reaction?:
|
|
85
|
+
const onClose = (reaction?: SendVideoReactionRequest) => {
|
|
86
86
|
if (reaction) {
|
|
87
87
|
call?.sendReaction(reaction).catch((e) => {
|
|
88
88
|
const logger = videoLoggerSystem.getLogger('ReactionsPicker');
|
|
@@ -7,9 +7,8 @@ import {
|
|
|
7
7
|
} from '@stream-io/video-react-bindings';
|
|
8
8
|
import { Avatar } from '../../utility/Avatar';
|
|
9
9
|
import type { StreamVideoParticipant } from '@stream-io/video-client';
|
|
10
|
-
import type { MediaStream } from '@stream-io/react-native-webrtc';
|
|
11
|
-
import { RTCView } from '@stream-io/react-native-webrtc';
|
|
12
10
|
import { LobbyControls as DefaultLobbyControls } from '../CallControls/LobbyControls';
|
|
11
|
+
import { LobbyCameraPreview } from './LobbyCameraPreview';
|
|
13
12
|
import {
|
|
14
13
|
JoinCallButton as DefaultJoinCallButton,
|
|
15
14
|
type JoinCallButtonProps,
|
|
@@ -65,9 +64,8 @@ export const Lobby = ({
|
|
|
65
64
|
const { useCameraState, useCallSettings } = useCallStateHooks();
|
|
66
65
|
const callSettings = useCallSettings();
|
|
67
66
|
const isVideoEnabledInCall = callSettings?.video.enabled;
|
|
68
|
-
const {
|
|
67
|
+
const { optimisticIsMute: cameraIsMuted } = useCameraState();
|
|
69
68
|
const { t } = useI18n();
|
|
70
|
-
const localVideoStream = mediaStream as unknown as MediaStream | undefined;
|
|
71
69
|
|
|
72
70
|
const connectedUserAsParticipant = useMemo(
|
|
73
71
|
() =>
|
|
@@ -98,13 +96,8 @@ export const Lobby = ({
|
|
|
98
96
|
]}
|
|
99
97
|
>
|
|
100
98
|
<View style={styles.topView} />
|
|
101
|
-
{!cameraIsMuted
|
|
102
|
-
<
|
|
103
|
-
mirror={true}
|
|
104
|
-
streamURL={localVideoStream.toURL()}
|
|
105
|
-
objectFit="cover"
|
|
106
|
-
style={StyleSheet.absoluteFill}
|
|
107
|
-
/>
|
|
99
|
+
{!cameraIsMuted ? (
|
|
100
|
+
<LobbyCameraPreview objectFit="cover" />
|
|
108
101
|
) : (
|
|
109
102
|
<View style={[styles.avatarContainer, lobby.avatarContainer]}>
|
|
110
103
|
<Avatar participant={connectedUserAsParticipant} />
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { Platform, StyleSheet, ViewStyle } from 'react-native';
|
|
3
|
+
import {
|
|
4
|
+
permissions,
|
|
5
|
+
RTCCameraPreviewView,
|
|
6
|
+
} from '@stream-io/react-native-webrtc';
|
|
7
|
+
import { useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Props for the {@link LobbyCameraPreview} component.
|
|
11
|
+
*/
|
|
12
|
+
export type LobbyCameraPreviewProps = {
|
|
13
|
+
/**
|
|
14
|
+
* Resembles the CSS style object-fit.
|
|
15
|
+
*
|
|
16
|
+
* @default 'cover'
|
|
17
|
+
*/
|
|
18
|
+
objectFit?: 'contain' | 'cover';
|
|
19
|
+
/**
|
|
20
|
+
* Style applied to the preview view.
|
|
21
|
+
*/
|
|
22
|
+
style?: ViewStyle;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The lobby runs before the call is joined. This component drives the native
|
|
27
|
+
* camera capturer directly via {@link RTCCameraPreviewView} which requires
|
|
28
|
+
* no track/peer connection factory to be created.
|
|
29
|
+
*
|
|
30
|
+
* It is driven by the *intended* camera state (optimistic): the lobby camera
|
|
31
|
+
* toggle only updates `optimisticStatus`; the real WebRTC track is acquired and
|
|
32
|
+
* published at join.
|
|
33
|
+
*/
|
|
34
|
+
export const LobbyCameraPreview = ({
|
|
35
|
+
style,
|
|
36
|
+
objectFit = 'cover',
|
|
37
|
+
}: LobbyCameraPreviewProps) => {
|
|
38
|
+
const { useCameraState, useCallSettings } = useCallStateHooks();
|
|
39
|
+
|
|
40
|
+
const { optimisticIsMute, direction, selectedDevice } = useCameraState();
|
|
41
|
+
const settings = useCallSettings();
|
|
42
|
+
|
|
43
|
+
const wantsCamera = !optimisticIsMute;
|
|
44
|
+
const hasCameraPermission = useEnsureCameraPermission(wantsCamera);
|
|
45
|
+
|
|
46
|
+
const facing = direction === 'back' ? 'back' : 'front';
|
|
47
|
+
|
|
48
|
+
// Capture at the call's target resolution so the running preview capturer matches
|
|
49
|
+
// what the track publishes and can be adopted at join without reconfiguring.
|
|
50
|
+
// Normalize to landscape, matching CameraManager.selectTargetResolution.
|
|
51
|
+
const targetResolution = settings?.video.target_resolution;
|
|
52
|
+
let captureWidth = targetResolution?.width ?? 1280;
|
|
53
|
+
let captureHeight = targetResolution?.height ?? 720;
|
|
54
|
+
if (captureWidth < captureHeight) {
|
|
55
|
+
[captureWidth, captureHeight] = [captureHeight, captureWidth];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<RTCCameraPreviewView
|
|
60
|
+
style={[StyleSheet.absoluteFill, style as any]}
|
|
61
|
+
isActive={wantsCamera && hasCameraPermission}
|
|
62
|
+
facing={facing}
|
|
63
|
+
deviceId={selectedDevice}
|
|
64
|
+
mirror={Platform.OS === 'ios' ? true : facing === 'front'}
|
|
65
|
+
objectFit={objectFit}
|
|
66
|
+
captureWidth={captureWidth}
|
|
67
|
+
captureHeight={captureHeight}
|
|
68
|
+
/>
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const useEnsureCameraPermission = (enabled: boolean): boolean => {
|
|
73
|
+
const [granted, setGranted] = useState(false);
|
|
74
|
+
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
if (!enabled || granted) return;
|
|
77
|
+
|
|
78
|
+
let cancelled = false;
|
|
79
|
+
(async () => {
|
|
80
|
+
try {
|
|
81
|
+
const status = await permissions.query({ name: 'camera' });
|
|
82
|
+
if (status === 'granted') {
|
|
83
|
+
if (!cancelled) setGranted(true);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const result = await permissions.request({ name: 'camera' });
|
|
87
|
+
if (!cancelled) setGranted(!!result);
|
|
88
|
+
} catch {
|
|
89
|
+
if (!cancelled) setGranted(false);
|
|
90
|
+
}
|
|
91
|
+
})();
|
|
92
|
+
|
|
93
|
+
return () => {
|
|
94
|
+
cancelled = true;
|
|
95
|
+
};
|
|
96
|
+
}, [enabled, granted]);
|
|
97
|
+
|
|
98
|
+
return granted;
|
|
99
|
+
};
|