@stream-io/video-react-native-sdk 1.40.1 → 1.40.2
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 +18 -2
- package/android/src/main/java/com/streamvideo/reactnative/audio/AudioDeviceManager.kt +45 -16
- package/android/src/main/java/com/streamvideo/reactnative/callmanager/StreamInCallManagerModule.kt +12 -0
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js +1 -1
- package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js.map +1 -1
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +36 -4
- package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/commonjs/modules/call-manager/CallManager.js +133 -1
- package/dist/commonjs/modules/call-manager/CallManager.js.map +1 -1
- package/dist/commonjs/utils/internal/callingx/callingx.js +37 -0
- package/dist/commonjs/utils/internal/callingx/callingx.js.map +1 -1
- package/dist/commonjs/utils/internal/registerSDKGlobals.js +34 -0
- package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/commonjs/utils/push/android.js +101 -103
- package/dist/commonjs/utils/push/android.js.map +1 -1
- package/dist/commonjs/utils/push/libs/callingx.js +3 -0
- package/dist/commonjs/utils/push/libs/callingx.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js +2 -2
- package/dist/module/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js.map +1 -1
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +36 -4
- package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/module/modules/call-manager/CallManager.js +133 -1
- package/dist/module/modules/call-manager/CallManager.js.map +1 -1
- package/dist/module/utils/internal/callingx/callingx.js +38 -1
- package/dist/module/utils/internal/callingx/callingx.js.map +1 -1
- package/dist/module/utils/internal/registerSDKGlobals.js +34 -0
- package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
- package/dist/module/utils/push/android.js +101 -103
- package/dist/module/utils/push/android.js.map +1 -1
- package/dist/module/utils/push/libs/callingx.js +3 -0
- package/dist/module/utils/push/libs/callingx.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.d.ts.map +1 -1
- package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
- package/dist/typescript/modules/call-manager/CallManager.d.ts.map +1 -1
- package/dist/typescript/utils/StreamVideoRN/types.d.ts +5 -0
- package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
- package/dist/typescript/utils/internal/callingx/callingx.d.ts.map +1 -1
- 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/callingx.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/expo-config-plugin/dist/index.js +0 -2
- package/package.json +6 -10
- package/src/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.tsx +3 -2
- package/src/hooks/useAndroidKeepCallAliveEffect.ts +54 -10
- package/src/modules/call-manager/CallManager.ts +162 -1
- package/src/modules/call-manager/native-module.d.ts +8 -0
- package/src/utils/StreamVideoRN/types.ts +5 -0
- package/src/utils/internal/callingx/callingx.ts +44 -1
- package/src/utils/internal/registerSDKGlobals.ts +38 -0
- package/src/utils/push/android.ts +141 -140
- package/src/utils/push/libs/callingx.ts +4 -0
- package/src/version.ts +1 -1
- package/expo-config-plugin/dist/withBuildProperties.js +0 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CallingState","videoLoggerSystem","AppState","Platform","getFirebaseMessagingLib","getFirebaseMessagingLibNoThrow","pushUnsubscriptionCallbacks","canListenToWS","shouldCallBeClosed","setPushLogoutCallback","StreamVideoRN","getCallingxLib","lastFirebaseToken","token","userId","initAndroidPushToken","client","pushConfig","setUnsubscribeListener","OS","android","pushProviderName","logger","getLogger","setDeviceToken","streamClient","_user","id","anonymous","debug","removeDevice","err","warn","push_provider_name","addDevice","messaging","isExpo","unsubscribe","onTokenRefresh","refreshedToken","getToken","firebaseDataHandler","data","getConfig","push","sender","type","call_cid","callingx","createStreamVideoClient","stopService","asForegroundService","
|
|
1
|
+
{"version":3,"names":["CallingState","videoLoggerSystem","AppState","Platform","getFirebaseMessagingLib","getFirebaseMessagingLibNoThrow","pushUnsubscriptionCallbacks","canListenToWS","shouldCallBeClosed","setPushLogoutCallback","StreamVideoRN","getCallingxLib","lastFirebaseToken","token","userId","initAndroidPushToken","client","pushConfig","setUnsubscribeListener","OS","android","pushProviderName","logger","getLogger","setDeviceToken","streamClient","_user","id","anonymous","debug","removeDevice","err","warn","push_provider_name","addDevice","messaging","isExpo","unsubscribe","onTokenRefresh","refreshedToken","getToken","firebaseDataHandler","data","getConfig","push","sender","type","call_cid","callingx","createStreamVideoClient","stopService","asForegroundService","backgroundTaskOwner","acquireBackgroundTask","catch","e","error","finishBackgroundTask","log","releaseBackgroundTask","_client","callFromPush","onRingingCall","mustEndCall","endCallReason","endCallWithReason","leave","reject","unsubscribeFunctions","on","event","_canListenToWS","forEach","fn","mustEndCallFromEvent","endCallReasonFromEvent","stateSubscription","state","callingState$","subscribe","callingState","IDLE","LEFT","endCallSubscription","addEventListener","callId","RINGING","reason","appStateSubscription","nextAppState","remove","get","cb","set"],"sourceRoot":"../../../../src","sources":["utils/push/android.ts"],"mappings":";;AAAA,SACEA,YAAY,EAEZC,iBAAiB,QACZ,yBAAyB;AAChC,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AAEjD,SAEEC,uBAAuB,EACvBC,8BAA8B,QACzB,QAAQ;AACf,SAASC,2BAA2B,QAAQ,sBAAsB;AAClE,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,kBAAkB;AACpE,SAASC,qBAAqB,QAAQ,gCAA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QAAQ,EAAEiB,aAAa,CAAC;MACnDH,YAAY,CAACK,KAAK,CAAC;QAAEC,MAAM,EAAE;MAAM,CAAC,CAAC,CAACb,KAAK,CAAEE,KAAK,IAAK;QACrDlC,MAAM,CAACkC,KAAK,CACV,8CAA8CT,QAAQ,KAAKS,KAAK,EAClE,CAAC;MACH,CAAC,CAAC;IACJ;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -66,6 +66,9 @@ export function extractCallingExpOptions(config) {
|
|
|
66
66
|
if (pushConfig.android.skipIncomingPushInForeground !== undefined) {
|
|
67
67
|
androidOptions.skipIncomingPushInForeground = pushConfig.android.skipIncomingPushInForeground;
|
|
68
68
|
}
|
|
69
|
+
if (pushConfig.android.defaultDeviceEndpointType !== undefined) {
|
|
70
|
+
androidOptions.defaultDeviceEndpointType = pushConfig.android.defaultDeviceEndpointType;
|
|
71
|
+
}
|
|
69
72
|
}
|
|
70
73
|
if (foregroundServiceConfig.android.channel) {
|
|
71
74
|
androidOptions.ongoingChannel = foregroundServiceConfig.android.channel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["callingx","require","CallingxModule","getCallingxLib","Error","getCallingxLibIfAvailable","undefined","extractCallingExpOptions","config","push","pushConfig","foregroundService","foregroundServiceConfig","callingExpOptions","ios","iosOptions","supportsVideo","sound","imageName","callsHistory","displayCallTimeout","enableOngoingCalls","skipIncomingPushInForeground","defaultDeviceEndpointType","Object","keys","length","androidOptions","android","incomingChannel","titleTransformer","notificationTexts","channel","ongoingChannel","shouldRejectCallWhenBusy"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/callingx.ts"],"mappings":";;AAUA,IAAIA,QAAoC;AAExC,IAAI;EACFA,QAAQ,GAAGC,OAAO,CAAC,kCAAkC,CAAC,CAACC,cAAc;AACvE,CAAC,CAAC,MAAM,CAAC;AAET,OAAO,SAASC,cAAcA,CAAA,EAAG;EAC/B,IAAI,CAACH,QAAQ,EAAE;IACb,MAAMI,KAAK,CAAC,i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hB,SAAS,EAAE;MAC7DS,UAAU,CAACO,4BAA4B,GACrCZ,UAAU,CAACI,GAAG,CAACQ,4BAA4B;IAC/C;IACA,IAAIZ,UAAU,CAACI,GAAG,CAACS,yBAAyB,KAAKjB,SAAS,EAAE;MAC1DS,UAAU,CAACQ,yBAAyB,GAClCb,UAAU,CAACI,GAAG,CAACS,yBAAyB;IAC5C;IAEA,IAAIC,MAAM,CAACC,IAAI,CAACV,UAAU,CAAC,CAACW,MAAM,GAAG,CAAC,EAAE;MACtCb,iBAAiB,CAACC,GAAG,GAAGC,UAAU;IACpC;EACF;EAEA,MAAMY,cAA4C,GAAG,CAAC,CAAC;EACvD,IAAIjB,UAAU,EAAEkB,OAAO,EAAE;IACvB,IAAIlB,UAAU,CAACkB,OAAO,CAACC,eAAe,EAAE;MACtCF,cAAc,CAACE,eAAe,GAAGnB,UAAU,CAACkB,OAAO,CAACC,eAAe;IACrE;IACA,IAAInB,UAAU,CAACkB,OAAO,CAACE,gBAAgB,EAAE;MACvCH,cAAc,CAACG,gBAAgB,GAAGpB,UAAU,CAACkB,OAAO,CAACE,gBAAgB;IACvE;IACA,IAAIpB,UAAU,CAACkB,OAAO,CAACG,iBAAiB,EAAE;MACxCJ,cAAc,CAACI,iBAAiB,GAAGrB,UAAU,CAACkB,OAAO,CAACG,iBAAiB;IACzE;IACA,IAAIrB,UAAU,CAACkB,OAAO,CAACP,kBAAkB,KAAKf,SAAS,EAAE;MACvDqB,cAAc,CAACN,kBAAkB,GAAGX,UAAU,CAACkB,OAAO,CAACP,kBAAkB;IAC3E;IACA,IAAIX,UAAU,CAACkB,OAAO,CAACN,4BAA4B,KAAKhB,SAAS,EAAE;MACjEqB,cAAc,CAACL,4BAA4B,GACzCZ,UAAU,CAACkB,OAAO,CAACN,4BAA4B;IACnD;EACF;EAEA,
|
|
1
|
+
{"version":3,"names":["callingx","require","CallingxModule","getCallingxLib","Error","getCallingxLibIfAvailable","undefined","extractCallingExpOptions","config","push","pushConfig","foregroundService","foregroundServiceConfig","callingExpOptions","ios","iosOptions","supportsVideo","sound","imageName","callsHistory","displayCallTimeout","enableOngoingCalls","skipIncomingPushInForeground","defaultDeviceEndpointType","Object","keys","length","androidOptions","android","incomingChannel","titleTransformer","notificationTexts","channel","ongoingChannel","shouldRejectCallWhenBusy"],"sourceRoot":"../../../../../src","sources":["utils/push/libs/callingx.ts"],"mappings":";;AAUA,IAAIA,QAAoC;AAExC,IAAI;EACFA,QAAQ,GAAGC,OAAO,CAAC,kCAAkC,CAAC,CAACC,cAAc;AACvE,CAAC,CAAC,MAAM,CAAC;AAET,OAAO,SAASC,cAAcA,CAAA,EAAG;EAC/B,IAAI,CAACH,QAAQ,EAAE;IACb,MAAMI,KAAK,CAAC,iDAAiD,CAAC;EAChE;EACA,OAAOJ,QAAQ;AACjB;AAEA,OAAO,SAASK,yBAAyBA,CAAA,EAAG;EAC1C,OAAOL,QAAQ,IAAIM,SAAS;AAC9B;AAEA,OAAO,SAASC,wBAAwBA,CACtCC,MAAyB,EACN;EACnB,MAAM;IAAEC,IAAI,EAAEC,UAAU;IAAEC,iBAAiB,EAAEC;EAAwB,CAAC,GACpEJ,MAAM;EACR,MAAMK,iBAAoC,GAAG,CAAC,CAAC;EAE/C,IAAIH,UAAU,EAAEI,GAAG,EAAE;IACnB,MAAMC,UAAoC,GAAG,CAAC,CAAC;IAC/C,IAAIL,UAAU,CAACI,GAAG,CAACE,aAAa,KAAKV,SAAS,EAAE;MAC9CS,UAAU,CAACC,aAAa,GAAGN,UAAU,CAACI,GAAG,CAACE,aAAa;IACzD;IACA,IAAIN,UAAU,CAACI,GAAG,CAACG,KAAK,KAAKX,SAAS,EAAE;MACtCS,UAAU,CAACE,KAAK,GAAGP,UAAU,CAACI,GAAG,CAACG,KAAK;IACzC;IACA,IAAIP,UAAU,CAACI,GAAG,CAACI,SAAS,KAAKZ,SAAS,EAAE;MAC1CS,UAAU,CAACG,SAAS,GAAGR,UAAU,CAACI,GAAG,CAACI,SAAS;IACjD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AiB,GAAGrB,UAAU,CAACkB,OAAO,CAACG,iBAAiB;IACzE;IACA,IAAIrB,UAAU,CAACkB,OAAO,CAACP,kBAAkB,KAAKf,SAAS,EAAE;MACvDqB,cAAc,CAACN,kBAAkB,GAAGX,UAAU,CAACkB,OAAO,CAACP,kBAAkB;IAC3E;IACA,IAAIX,UAAU,CAACkB,OAAO,CAACN,4BAA4B,KAAKhB,SAAS,EAAE;MACjEqB,cAAc,CAACL,4BAA4B,GACzCZ,UAAU,CAACkB,OAAO,CAACN,4BAA4B;IACnD;IACA,IAAIZ,UAAU,CAACkB,OAAO,CAACL,yBAAyB,KAAKjB,SAAS,EAAE;MAC9DqB,cAAc,CAACJ,yBAAyB,GACtCb,UAAU,CAACkB,OAAO,CAACL,yBAAyB;IAChD;EACF;EAEA,IAAIX,uBAAuB,CAACgB,OAAO,CAACI,OAAO,EAAE;IAC3CL,cAAc,CAACM,cAAc,GAAGrB,uBAAuB,CAACgB,OAAO,CAACI,OAAO;EACzE;EAEA,IAAIR,MAAM,CAACC,IAAI,CAACE,cAAc,CAAC,CAACD,MAAM,GAAG,CAAC,EAAE;IAC1Cb,iBAAiB,CAACe,OAAO,GAAGD,cAAc;EAC5C;EAEA,IAAIjB,UAAU,EAAEwB,wBAAwB,KAAK5B,SAAS,EAAE;IACtDO,iBAAiB,CAACqB,wBAAwB,GACxCxB,UAAU,CAACwB,wBAAwB;EACvC;EAEA,OAAOrB,iBAAiB;AAC1B","ignoreList":[]}
|
package/dist/module/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrackSubscriber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EACL,IAAI,
|
|
1
|
+
{"version":3,"file":"TrackSubscriber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EACL,IAAI,EAOJ,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAC;AASjC,MAAM,MAAM,qBAAqB,GAAG;IAClC,cAAc,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;EAUE;AACF,QAAA,MAAM,eAAe,wHA0EpB,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAndroidKeepCallAliveEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAndroidKeepCallAliveEffect.ts"],"names":[],"mappings":"AA4EA;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,
|
|
1
|
+
{"version":3,"file":"useAndroidKeepCallAliveEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAndroidKeepCallAliveEffect.ts"],"names":[],"mappings":"AA4EA;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,YAgIzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallManager.d.ts","sourceRoot":"","sources":["../../../../src/modules/call-manager/CallManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"CallManager.d.ts","sourceRoot":"","sources":["../../../../src/modules/call-manager/CallManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AA+EjB,cAAM,kBAAkB;IACtB,OAAO,CAAC,YAAY,CAAC,CAAqB;IAE1C;;OAEG;IACH,oBAAoB,QAAa,OAAO,CAAC,iBAAiB,CAAC,CAQzD;IAEF;;;;OAIG;IACH,iBAAiB,GAAI,cAAc,MAAM,KAAG,IAAI,CA2B9C;IAEF;;;OAGG;IACH,4BAA4B,GAC1B,UAAU,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,IAAI,KACvD,CAAC,MAAM,IAAI,CAAC,CAsBb;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;AAeD,qBAAa,WAAW;IACtB,OAAO,qBAA4B;IACnC,GAAG,iBAAwB;IAC3B,OAAO,iBAAwB;IAE/B;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,GAAI,SAAS,yBAAyB,KAAG,IAAI,CAwChD;IAEF;;OAEG;IACH,IAAI,QAAO,IAAI,CAQb;IAEF;;;OAGG;IACH,aAAa,QAAO,IAAI,CAAkC;IAE1D;;;OAGG;IACH,gBAAgB,QAAO,MAAM,CAAqC;CACnE"}
|
|
@@ -121,6 +121,11 @@ export type StreamVideoConfig = {
|
|
|
121
121
|
* @default false
|
|
122
122
|
*/
|
|
123
123
|
skipIncomingPushInForeground?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Default audio endpoint for Telecom-managed calls on Android.
|
|
126
|
+
* @default 'speaker'
|
|
127
|
+
*/
|
|
128
|
+
defaultDeviceEndpointType?: 'speaker' | 'earpiece';
|
|
124
129
|
};
|
|
125
130
|
/**
|
|
126
131
|
* Whether to reject calls when the user is busy.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/utils/StreamVideoRN/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,iBAAiB,EACjB,KAAK,IAAI,EACV,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAC3B,mBAAmB,GACnB,mBAAmB,GACnB,aAAa,CAAC;AAElB,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;OAIG;IACH,IAAI,CAAC,EAAE;QACL,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;;;WAIG;QACH,cAAc,CAAC,EAAE,oBAAoB,CAAC;QAEtC,GAAG,CAAC,EAAE;YACJ;;;;eAIG;YACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;YAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;YACxB;;;eAGG;YACH,KAAK,CAAC,EAAE,MAAM,CAAC;YACf;;;eAGG;YACH,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB;;;eAGG;YACH,YAAY,CAAC,EAAE,OAAO,CAAC;YACvB;;;eAGG;YACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;YAC5B;;;eAGG;YACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;YAC7B;;;;;;eAMG;YACH,4BAA4B,CAAC,EAAE,OA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iBG;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"}
|
|
@@ -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;AAGtE,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;AAGtE,OAAO,KAAK,EACV,IAAI,EACJ,cAAc,EACd,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AA6CjC;;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,iBAgCpD;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,iBAmFrE;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,aAAa,iBAmBvE"}
|
|
@@ -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":"AAuKA,wBAAgB,kBAAkB,SAIjC"}
|
|
@@ -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,EACL,KAAK,sBAAsB,EAG5B,MAAM,QAAQ,CAAC;AAOhB,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,iBAgD1D;AAED;;;GAGG;AAEH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,sBAAsB,CAAC,aAAa,CAAC,MAAM,CAAC,
|
|
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,EACL,KAAK,sBAAsB,EAG5B,MAAM,QAAQ,CAAC;AAOhB,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,iBAgD1D;AAED;;;GAGG;AAEH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,sBAAsB,CAAC,aAAa,CAAC,MAAM,CAAC,kBAgOnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callingx.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/callingx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,MAAM,cAAc,GACxB,OAAO,kCAAkC,EAAE,eAAe,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,OAAO,kCAAkC,EAAE,SAAS,CAAC;AAC7E,MAAM,MAAM,WAAW,GACrB,OAAO,kCAAkC,EAAE,WAAW,CAAC;AACzD,MAAM,MAAM,iBAAiB,GAC3B,OAAO,kCAAkC,EAAE,iBAAiB,CAAC;AAQ/D,wBAAgB,cAAc,+DAK7B;AAED,wBAAgB,yBAAyB,2EAExC;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,iBAAiB,GACxB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"callingx.d.ts","sourceRoot":"","sources":["../../../../../src/utils/push/libs/callingx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,MAAM,cAAc,GACxB,OAAO,kCAAkC,EAAE,eAAe,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,OAAO,kCAAkC,EAAE,SAAS,CAAC;AAC7E,MAAM,MAAM,WAAW,GACrB,OAAO,kCAAkC,EAAE,WAAW,CAAC;AACzD,MAAM,MAAM,iBAAiB,GAC3B,OAAO,kCAAkC,EAAE,iBAAiB,CAAC;AAQ/D,wBAAgB,cAAc,+DAK7B;AAED,wBAAgB,yBAAyB,2EAExC;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,iBAAiB,GACxB,iBAAiB,CA6EnB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "1.40.
|
|
1
|
+
export declare const version = "1.40.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -10,7 +10,6 @@ const withAndroidManifest_1 = __importDefault(require("./withAndroidManifest"));
|
|
|
10
10
|
const withiOSInfoPlist_1 = __importDefault(require("./withiOSInfoPlist"));
|
|
11
11
|
const withMainActivity_1 = __importDefault(require("./withMainActivity"));
|
|
12
12
|
const withMainApplication_1 = __importDefault(require("./withMainApplication"));
|
|
13
|
-
const withBuildProperties_1 = __importDefault(require("./withBuildProperties"));
|
|
14
13
|
const withAppBuildGradle_1 = __importDefault(require("./withAppBuildGradle"));
|
|
15
14
|
const withIosScreenCapture_1 = __importDefault(require("./withIosScreenCapture"));
|
|
16
15
|
const withCallResources_1 = __importDefault(require("./withCallResources"));
|
|
@@ -25,7 +24,6 @@ const withStreamVideoReactNativeSDK = (config, props) => {
|
|
|
25
24
|
// android
|
|
26
25
|
() => (0, withAndroidPermissions_1.default)(config, props),
|
|
27
26
|
withAppBuildGradle_1.default,
|
|
28
|
-
withBuildProperties_1.default,
|
|
29
27
|
() => (0, withAndroidManifest_1.default)(config, props),
|
|
30
28
|
() => (0, withMainActivity_1.default)(config, props),
|
|
31
29
|
() => (0, withMainApplication_1.default)(config, props),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-native-sdk",
|
|
3
|
-
"version": "1.40.
|
|
3
|
+
"version": "1.40.2",
|
|
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/",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"build": "yarn copy-version && bob build && yarn build:expo-plugin",
|
|
18
18
|
"test:expo-plugin": "jest --config=expo-config-plugin/jest.config.js --coverage",
|
|
19
19
|
"test": "yarn copy-version && jest --coverage && yarn test:expo-plugin",
|
|
20
|
+
"test:types": "yarn copy-version && tsc -p tsconfig.spec.json",
|
|
20
21
|
"copy-version": "echo \"export const version = '$npm_package_version';\" > ./src/version.ts"
|
|
21
22
|
},
|
|
22
23
|
"repository": {
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
],
|
|
53
54
|
"dependencies": {
|
|
54
55
|
"@stream-io/video-client": "1.55.1",
|
|
55
|
-
"@stream-io/video-react-bindings": "1.18.
|
|
56
|
+
"@stream-io/video-react-bindings": "1.18.2",
|
|
56
57
|
"intl-pluralrules": "2.0.1",
|
|
57
58
|
"react-native-url-polyfill": "^3.0.0",
|
|
58
59
|
"rxjs": "~7.8.2",
|
|
@@ -67,7 +68,6 @@
|
|
|
67
68
|
"@stream-io/react-native-webrtc": "^145.0.0",
|
|
68
69
|
"@stream-io/video-filters-react-native": ">=0.1.0",
|
|
69
70
|
"expo": ">=47.0.0",
|
|
70
|
-
"expo-build-properties": "*",
|
|
71
71
|
"expo-notifications": "*",
|
|
72
72
|
"react": ">=17.0.0",
|
|
73
73
|
"react-native": ">=0.73.0",
|
|
@@ -94,9 +94,6 @@
|
|
|
94
94
|
"expo": {
|
|
95
95
|
"optional": true
|
|
96
96
|
},
|
|
97
|
-
"expo-build-properties": {
|
|
98
|
-
"optional": true
|
|
99
|
-
},
|
|
100
97
|
"expo-notifications": {
|
|
101
98
|
"optional": true
|
|
102
99
|
},
|
|
@@ -117,11 +114,11 @@
|
|
|
117
114
|
"@react-native-firebase/messaging": "^24.0.0",
|
|
118
115
|
"@react-native/babel-preset": "0.85.3",
|
|
119
116
|
"@react-native/metro-config": "0.85.3",
|
|
120
|
-
"@stream-io/noise-cancellation-react-native": "^0.9.
|
|
121
|
-
"@stream-io/react-native-callingx": "^0.6.
|
|
117
|
+
"@stream-io/noise-cancellation-react-native": "^0.9.2",
|
|
118
|
+
"@stream-io/react-native-callingx": "^0.6.2",
|
|
122
119
|
"@stream-io/react-native-webrtc": "145.0.0",
|
|
123
120
|
"@stream-io/typescript-config": "^0.0.0",
|
|
124
|
-
"@stream-io/video-filters-react-native": "^0.14.
|
|
121
|
+
"@stream-io/video-filters-react-native": "^0.14.2",
|
|
125
122
|
"@testing-library/jest-native": "^5.4.3",
|
|
126
123
|
"@testing-library/react-native": "13.3.3",
|
|
127
124
|
"@tsconfig/node18": "^18.2.6",
|
|
@@ -130,7 +127,6 @@
|
|
|
130
127
|
"@types/react": "~19.2.15",
|
|
131
128
|
"@types/react-test-renderer": "^19.1.0",
|
|
132
129
|
"expo": "~56.0.9",
|
|
133
|
-
"expo-build-properties": "~56.0.17",
|
|
134
130
|
"expo-module-scripts": "^56.0.3",
|
|
135
131
|
"expo-notifications": "~56.0.16",
|
|
136
132
|
"jest": "^29.7.0",
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
hasScreenShare,
|
|
8
8
|
hasVideo,
|
|
9
9
|
SfuModels,
|
|
10
|
+
type StreamVideoParticipant,
|
|
10
11
|
type VideoTrackType,
|
|
11
12
|
} from '@stream-io/video-client';
|
|
12
13
|
import {
|
|
@@ -14,8 +15,8 @@ import {
|
|
|
14
15
|
combineLatest,
|
|
15
16
|
distinctUntilChanged,
|
|
16
17
|
distinctUntilKeyChanged,
|
|
18
|
+
filter,
|
|
17
19
|
map,
|
|
18
|
-
takeWhile,
|
|
19
20
|
} from 'rxjs';
|
|
20
21
|
export type TrackSubscriberHandle = {
|
|
21
22
|
onLayoutUpdate: (event: LayoutChangeEvent) => void;
|
|
@@ -67,7 +68,7 @@ const TrackSubscriber = forwardRef<TrackSubscriberHandle, TrackSubscriberProps>(
|
|
|
67
68
|
};
|
|
68
69
|
const isPublishingTrack$ = call.state.participants$.pipe(
|
|
69
70
|
map((ps) => ps.find((p) => p.sessionId === participantSessionId)),
|
|
70
|
-
|
|
71
|
+
filter((p): p is StreamVideoParticipant => !!p),
|
|
71
72
|
distinctUntilKeyChanged('publishedTracks'),
|
|
72
73
|
map((p) =>
|
|
73
74
|
trackType === 'videoTrack' ? hasVideo(p) : hasScreenShare(p),
|
|
@@ -82,6 +82,7 @@ async function startForegroundService(call_cid: string) {
|
|
|
82
82
|
*/
|
|
83
83
|
export const useAndroidKeepCallAliveEffect = () => {
|
|
84
84
|
const foregroundServiceStartedRef = useRef(false);
|
|
85
|
+
const callingxKeepAliveOwnerRef = useRef<string | undefined>(undefined);
|
|
85
86
|
|
|
86
87
|
const call = useCall();
|
|
87
88
|
keepCallAliveCallRef.current = call;
|
|
@@ -101,15 +102,46 @@ export const useAndroidKeepCallAliveEffect = () => {
|
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
const callingx = getCallingxLibIfAvailable();
|
|
104
|
-
|
|
105
|
-
callingx?.isSetup &&
|
|
106
|
-
(isRingingCall || (!isRingingCall && callingx?.isOngoingCallsEnabled))
|
|
107
|
-
|
|
105
|
+
const isCallingxManaged =
|
|
106
|
+
!!callingx?.isSetup &&
|
|
107
|
+
(isRingingCall || (!isRingingCall && callingx?.isOngoingCallsEnabled));
|
|
108
|
+
|
|
109
|
+
const isCallEnded =
|
|
110
|
+
callingState === CallingState.IDLE || callingState === CallingState.LEFT;
|
|
111
|
+
|
|
112
|
+
// Release the callingx keep-alive task when the call ends.
|
|
113
|
+
if (callingxKeepAliveOwnerRef.current && isCallEnded) {
|
|
114
|
+
const currentOwner = callingxKeepAliveOwnerRef.current;
|
|
115
|
+
callingxKeepAliveOwnerRef.current = undefined;
|
|
116
|
+
callingx?.releaseBackgroundTask(currentOwner).catch(() => {});
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (isCallingxManaged && callingx) {
|
|
121
|
+
// Mutual exclusion: never acquire the callingx task while the SDK's own keep-alive FGS is
|
|
122
|
+
// running — only one keep-alive mechanism should be active per call.
|
|
123
|
+
if (
|
|
124
|
+
!callingxKeepAliveOwnerRef.current &&
|
|
125
|
+
!isCallEnded &&
|
|
126
|
+
!foregroundServiceStartedRef.current
|
|
127
|
+
) {
|
|
128
|
+
const owner = `keepalive:${activeCallCid}`;
|
|
129
|
+
callingxKeepAliveOwnerRef.current = owner;
|
|
130
|
+
callingx.acquireBackgroundTask(owner).catch((e) => {
|
|
131
|
+
if (callingxKeepAliveOwnerRef.current === owner) {
|
|
132
|
+
callingxKeepAliveOwnerRef.current = undefined;
|
|
133
|
+
}
|
|
134
|
+
videoLoggerSystem
|
|
135
|
+
.getLogger('useAndroidKeepCallAliveEffect')
|
|
136
|
+
.warn('Failed to acquire callingx keep-alive background task', e);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
108
139
|
return undefined;
|
|
109
140
|
}
|
|
110
141
|
|
|
111
|
-
//
|
|
112
|
-
|
|
142
|
+
// Start keep-alive FGS as soon as the call is joined — but only if the callingx
|
|
143
|
+
// keep-alive task isn't already holding the call alive.
|
|
144
|
+
if (shouldStartForegroundService && !callingxKeepAliveOwnerRef.current) {
|
|
113
145
|
const run = async () => {
|
|
114
146
|
if (foregroundServiceStartedRef.current) {
|
|
115
147
|
return;
|
|
@@ -135,10 +167,7 @@ export const useAndroidKeepCallAliveEffect = () => {
|
|
|
135
167
|
return () => {
|
|
136
168
|
sub.remove();
|
|
137
169
|
};
|
|
138
|
-
} else if (
|
|
139
|
-
callingState === CallingState.IDLE ||
|
|
140
|
-
callingState === CallingState.LEFT
|
|
141
|
-
) {
|
|
170
|
+
} else if (isCallEnded) {
|
|
142
171
|
if (foregroundServiceStartedRef.current) {
|
|
143
172
|
keepCallAliveCallRef.current = undefined;
|
|
144
173
|
// stop foreground service when the call is not active
|
|
@@ -162,6 +191,21 @@ export const useAndroidKeepCallAliveEffect = () => {
|
|
|
162
191
|
stopForegroundServiceNoThrow();
|
|
163
192
|
foregroundServiceStartedRef.current = false;
|
|
164
193
|
}
|
|
194
|
+
// release the callingx keep-alive task if still held
|
|
195
|
+
if (callingxKeepAliveOwnerRef.current) {
|
|
196
|
+
const owner = callingxKeepAliveOwnerRef.current;
|
|
197
|
+
callingxKeepAliveOwnerRef.current = undefined;
|
|
198
|
+
getCallingxLibIfAvailable()
|
|
199
|
+
?.releaseBackgroundTask(owner)
|
|
200
|
+
.catch(() => {
|
|
201
|
+
videoLoggerSystem
|
|
202
|
+
.getLogger('useAndroidKeepCallAliveEffect')
|
|
203
|
+
.warn(
|
|
204
|
+
'Failed to release callingx keep-alive background task',
|
|
205
|
+
owner,
|
|
206
|
+
);
|
|
207
|
+
});
|
|
208
|
+
}
|
|
165
209
|
};
|
|
166
210
|
}, []);
|
|
167
211
|
};
|
|
@@ -4,6 +4,10 @@ import type {
|
|
|
4
4
|
IOSAudioInterruptionEvent,
|
|
5
5
|
StreamInCallManagerConfig,
|
|
6
6
|
} from './types';
|
|
7
|
+
import type {
|
|
8
|
+
AudioEndpoint as CallingxAudioEndpoint,
|
|
9
|
+
AudioEndpointsSnapshot as CallingxAudioSnapshot,
|
|
10
|
+
} from '@stream-io/react-native-callingx';
|
|
7
11
|
import { getCallingxLibIfAvailable } from '../../utils/push/libs/callingx';
|
|
8
12
|
import { videoLoggerSystem } from '@stream-io/video-client';
|
|
9
13
|
|
|
@@ -15,6 +19,69 @@ const invariant = (condition: boolean, message: string) => {
|
|
|
15
19
|
if (!condition) throw new Error(message);
|
|
16
20
|
};
|
|
17
21
|
|
|
22
|
+
/**
|
|
23
|
+
* On Android, whether the current call is managed by Telecom (via callingx).
|
|
24
|
+
* In that mode, audio routing/mode is owned by Telecom and StreamInCallManager audio methods should not be used
|
|
25
|
+
*/
|
|
26
|
+
const isAndroidTelecomManaged = (): boolean => {
|
|
27
|
+
if (Platform.OS !== 'android' || !CallingxModule) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
return (
|
|
31
|
+
CallingxModule.isSetup &&
|
|
32
|
+
CallingxModule.isTelecomBacked &&
|
|
33
|
+
(CallingxModule.hasRegisteredCall() || CallingxModule.isOngoingCallsEnabled)
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* When the current call is Telecom-managed, returns the callingx module and the
|
|
39
|
+
* registered callId. Centralizes the guard so call sites don't repeat the module /
|
|
40
|
+
* callId checks — `isAndroidTelecomManaged()` already implies the module exists, but
|
|
41
|
+
* the extra narrowing here is what makes that provable to the type-checker.
|
|
42
|
+
*/
|
|
43
|
+
const getTelecomContext = ():
|
|
44
|
+
| { cx: NonNullable<typeof CallingxModule>; callId: string }
|
|
45
|
+
| undefined => {
|
|
46
|
+
if (!isAndroidTelecomManaged() || !CallingxModule) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
const callId = CallingxModule.getRegisteredCallIds()[0];
|
|
50
|
+
if (!callId) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
return { cx: CallingxModule, callId };
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** Map a generic Telecom endpoint type to the SDK's endpoint display name. */
|
|
57
|
+
const endpointTypeToDisplayName = (
|
|
58
|
+
type: string,
|
|
59
|
+
): AudioDeviceStatus['currentEndpointType'] => {
|
|
60
|
+
switch (type) {
|
|
61
|
+
case 'earpiece':
|
|
62
|
+
return 'Earpiece';
|
|
63
|
+
case 'speaker':
|
|
64
|
+
return 'Speaker';
|
|
65
|
+
case 'wired_headset':
|
|
66
|
+
return 'Wired Headset';
|
|
67
|
+
case 'bluetooth':
|
|
68
|
+
return 'Bluetooth Device';
|
|
69
|
+
default:
|
|
70
|
+
return 'Unknown';
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/** Adapt a callingx endpoints snapshot to the SDK's {@link AudioDeviceStatus}. */
|
|
75
|
+
const snapshotToStatus = (
|
|
76
|
+
snapshot: CallingxAudioSnapshot,
|
|
77
|
+
): AudioDeviceStatus => ({
|
|
78
|
+
devices: snapshot.endpoints.map((e) => e.name),
|
|
79
|
+
currentEndpointType: snapshot.currentEndpoint
|
|
80
|
+
? endpointTypeToDisplayName(snapshot.currentEndpoint.type)
|
|
81
|
+
: 'Unknown',
|
|
82
|
+
selectedDevice: snapshot.currentEndpoint?.name ?? '',
|
|
83
|
+
});
|
|
84
|
+
|
|
18
85
|
class AndroidCallManager {
|
|
19
86
|
private eventEmitter?: NativeEventEmitter;
|
|
20
87
|
|
|
@@ -23,6 +90,11 @@ class AndroidCallManager {
|
|
|
23
90
|
*/
|
|
24
91
|
getAudioDeviceStatus = async (): Promise<AudioDeviceStatus> => {
|
|
25
92
|
invariant(Platform.OS === 'android', 'Supported only on Android');
|
|
93
|
+
const tc = getTelecomContext();
|
|
94
|
+
if (tc) {
|
|
95
|
+
const snapshot = await tc.cx.getAvailableAudioEndpoints(tc.callId);
|
|
96
|
+
return snapshotToStatus(snapshot);
|
|
97
|
+
}
|
|
26
98
|
return NativeManager.getAudioDeviceStatus();
|
|
27
99
|
};
|
|
28
100
|
|
|
@@ -33,6 +105,30 @@ class AndroidCallManager {
|
|
|
33
105
|
*/
|
|
34
106
|
selectAudioDevice = (endpointName: string): void => {
|
|
35
107
|
invariant(Platform.OS === 'android', 'Supported only on Android');
|
|
108
|
+
const tc = getTelecomContext();
|
|
109
|
+
if (tc) {
|
|
110
|
+
const { cx, callId } = tc;
|
|
111
|
+
// Resolve name -> endpoint id from the current Telecom snapshot, then route via Telecom.
|
|
112
|
+
cx.getAvailableAudioEndpoints(callId)
|
|
113
|
+
.then((snapshot) => {
|
|
114
|
+
const target = snapshot.endpoints.find(
|
|
115
|
+
(e) => e.name === endpointName,
|
|
116
|
+
);
|
|
117
|
+
if (target) {
|
|
118
|
+
return cx.requestAudioEndpointChange(callId, target.id);
|
|
119
|
+
}
|
|
120
|
+
return undefined;
|
|
121
|
+
})
|
|
122
|
+
.catch((error) => {
|
|
123
|
+
videoLoggerSystem
|
|
124
|
+
.getLogger('CallManager')
|
|
125
|
+
.warn(
|
|
126
|
+
`selectAudioDevice: failed to route to "${endpointName}" for call ${callId} via Telecom`,
|
|
127
|
+
error,
|
|
128
|
+
);
|
|
129
|
+
});
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
36
132
|
NativeManager.chooseAudioDeviceEndpoint(endpointName);
|
|
37
133
|
};
|
|
38
134
|
|
|
@@ -44,9 +140,26 @@ class AndroidCallManager {
|
|
|
44
140
|
onChange: (audioDeviceStatus: AudioDeviceStatus) => void,
|
|
45
141
|
): (() => void) => {
|
|
46
142
|
invariant(Platform.OS === 'android', 'Supported only on Android');
|
|
143
|
+
const cleanups: Array<() => void> = [];
|
|
144
|
+
|
|
145
|
+
// Telecom (callingx) route changes.
|
|
146
|
+
if (CallingxModule?.isSetup && CallingxModule.isTelecomBacked) {
|
|
147
|
+
const sub = CallingxModule.addEventListener(
|
|
148
|
+
'didChangeAudioEndpoints',
|
|
149
|
+
(params) => onChange(snapshotToStatus(params)),
|
|
150
|
+
);
|
|
151
|
+
cleanups.push(() => sub.remove());
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// StreamInCallManager route changes (non-Telecom calls). Native
|
|
155
|
+
// suppresses these while in telecom-managed mode, and callingx emits no
|
|
156
|
+
// endpoint events for non-Telecom calls, so the two sources never overlap
|
|
157
|
+
// at runtime — safe to keep both subscribed in parallel.
|
|
47
158
|
this.eventEmitter ??= new NativeEventEmitter(NativeManager);
|
|
48
159
|
const s = this.eventEmitter.addListener('onAudioDeviceChanged', onChange);
|
|
49
|
-
|
|
160
|
+
cleanups.push(() => s.remove());
|
|
161
|
+
|
|
162
|
+
return () => cleanups.forEach((cleanup) => cleanup());
|
|
50
163
|
};
|
|
51
164
|
}
|
|
52
165
|
|
|
@@ -95,6 +208,38 @@ class SpeakerManager {
|
|
|
95
208
|
* Forces speakerphone on/off.
|
|
96
209
|
*/
|
|
97
210
|
setForceSpeakerphoneOn = (force: boolean): void => {
|
|
211
|
+
const tc = getTelecomContext();
|
|
212
|
+
if (tc) {
|
|
213
|
+
const { cx, callId } = tc;
|
|
214
|
+
// Telecom owns routing: map on -> speaker endpoint, off -> highest-priority
|
|
215
|
+
// non-speaker endpoint (wired > bluetooth > earpiece), mirroring classic behavior.
|
|
216
|
+
cx.getAvailableAudioEndpoints(callId)
|
|
217
|
+
.then((snapshot) => {
|
|
218
|
+
let target: CallingxAudioEndpoint | undefined;
|
|
219
|
+
if (force) {
|
|
220
|
+
target = snapshot.endpoints.find((e) => e.type === 'speaker');
|
|
221
|
+
} else {
|
|
222
|
+
// Priority for the "speakerphone off" fallback: prefer wired, then bluetooth, then earpiece.
|
|
223
|
+
for (const type of ['wired_headset', 'bluetooth', 'earpiece']) {
|
|
224
|
+
target = snapshot.endpoints.find((e) => e.type === type);
|
|
225
|
+
if (target) break;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (target) {
|
|
229
|
+
return cx.requestAudioEndpointChange(callId, target.id);
|
|
230
|
+
}
|
|
231
|
+
return undefined;
|
|
232
|
+
})
|
|
233
|
+
.catch((error) => {
|
|
234
|
+
videoLoggerSystem
|
|
235
|
+
.getLogger('CallManager')
|
|
236
|
+
.warn(
|
|
237
|
+
`setForceSpeakerphoneOn(${force}): failed to route for call ${callId} via Telecom`,
|
|
238
|
+
error,
|
|
239
|
+
);
|
|
240
|
+
});
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
98
243
|
NativeManager.setForceSpeakerphoneOn(force);
|
|
99
244
|
};
|
|
100
245
|
}
|
|
@@ -149,6 +294,22 @@ export class CallManager {
|
|
|
149
294
|
);
|
|
150
295
|
return;
|
|
151
296
|
}
|
|
297
|
+
if (isAndroidTelecomManaged()) {
|
|
298
|
+
// Telecom owns routing/focus; forward the sticky preference to callingx and run in
|
|
299
|
+
// telecom-managed mode (StreamInCallManager keeps proximity/keep-screen-on only).
|
|
300
|
+
if (config?.audioRole !== 'listener' && CallingxModule) {
|
|
301
|
+
CallingxModule.setDefaultAudioDeviceEndpointType(
|
|
302
|
+
config?.deviceEndpointType ?? 'speaker',
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
NativeManager.setTelecomManagedMode(true);
|
|
306
|
+
NativeManager.setAudioRole(config?.audioRole ?? 'communicator');
|
|
307
|
+
NativeManager.start();
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
if (Platform.OS === 'android') {
|
|
311
|
+
NativeManager.setTelecomManagedMode(false);
|
|
312
|
+
}
|
|
152
313
|
NativeManager.setAudioRole(config?.audioRole ?? 'communicator');
|
|
153
314
|
if (config?.audioRole === 'communicator') {
|
|
154
315
|
const type = config.deviceEndpointType ?? 'speaker';
|
|
@@ -24,6 +24,14 @@ export interface CallManager extends NativeModule {
|
|
|
24
24
|
*/
|
|
25
25
|
setDefaultAudioDeviceEndpointType: (type: DeviceEndpointType) => void;
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Enables/disables Telecom-managed mode (Android). Must be set before **start()**.
|
|
29
|
+
* When enabled, audio focus, mode and device routing are owned by the Android
|
|
30
|
+
* Telecom stack (via callingx); StreamInCallManager only keeps proximity,
|
|
31
|
+
* keep-screen-on and mic/output mute.
|
|
32
|
+
*/
|
|
33
|
+
setTelecomManagedMode: (enabled: boolean) => void;
|
|
34
|
+
|
|
27
35
|
/**
|
|
28
36
|
* Choose an audio device endpoint.
|
|
29
37
|
* @param endpointName - The name of the audio device endpoint to choose.
|
|
@@ -133,6 +133,11 @@ export type StreamVideoConfig = {
|
|
|
133
133
|
* @default false
|
|
134
134
|
*/
|
|
135
135
|
skipIncomingPushInForeground?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Default audio endpoint for Telecom-managed calls on Android.
|
|
138
|
+
* @default 'speaker'
|
|
139
|
+
*/
|
|
140
|
+
defaultDeviceEndpointType?: 'speaker' | 'earpiece';
|
|
136
141
|
};
|
|
137
142
|
/**
|
|
138
143
|
* Whether to reject calls when the user is busy.
|