@stream-io/video-react-native-sdk 1.31.1-beta.0 → 1.32.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/commonjs/components/Participant/ParticipantView/ParticipantLabel.js +2 -6
  3. package/dist/commonjs/components/Participant/ParticipantView/ParticipantLabel.js.map +1 -1
  4. package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js +5 -3
  5. package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js.map +1 -1
  6. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +0 -32
  7. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  8. package/dist/commonjs/utils/StreamVideoRN/index.js +1 -1
  9. package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
  10. package/dist/commonjs/utils/internal/callingx/callingx.js +8 -8
  11. package/dist/commonjs/utils/internal/callingx/callingx.js.map +1 -1
  12. package/dist/commonjs/utils/push/libs/notifee/index.js +0 -4
  13. package/dist/commonjs/utils/push/libs/notifee/index.js.map +1 -1
  14. package/dist/commonjs/version.js +1 -1
  15. package/dist/commonjs/version.js.map +1 -1
  16. package/dist/module/components/Participant/ParticipantView/ParticipantLabel.js +2 -6
  17. package/dist/module/components/Participant/ParticipantView/ParticipantLabel.js.map +1 -1
  18. package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js +5 -3
  19. package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js.map +1 -1
  20. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +0 -32
  21. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  22. package/dist/module/utils/StreamVideoRN/index.js +1 -1
  23. package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
  24. package/dist/module/utils/internal/callingx/callingx.js +8 -8
  25. package/dist/module/utils/internal/callingx/callingx.js.map +1 -1
  26. package/dist/module/utils/push/libs/notifee/index.js +0 -3
  27. package/dist/module/utils/push/libs/notifee/index.js.map +1 -1
  28. package/dist/module/version.js +1 -1
  29. package/dist/module/version.js.map +1 -1
  30. package/dist/typescript/components/Participant/ParticipantView/ParticipantLabel.d.ts.map +1 -1
  31. package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts.map +1 -1
  32. package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
  33. package/dist/typescript/utils/internal/callingx/callingx.d.ts.map +1 -1
  34. package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +2 -16
  35. package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
  36. package/dist/typescript/utils/push/libs/notifee/index.d.ts +0 -1
  37. package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +1 -1
  38. package/dist/typescript/version.d.ts +1 -1
  39. package/dist/typescript/version.d.ts.map +1 -1
  40. package/ios/StreamVideoReactNative-Bridging-Header.h +3 -1
  41. package/ios/StreamVideoReactNative.m +16 -8
  42. package/package.json +6 -6
  43. package/src/components/Participant/ParticipantView/ParticipantLabel.tsx +2 -7
  44. package/src/hooks/push/useCallingExpWithCallingStateEffect.ts +8 -4
  45. package/src/hooks/useAndroidKeepCallAliveEffect.ts +0 -40
  46. package/src/utils/StreamVideoRN/index.ts +1 -1
  47. package/src/utils/internal/callingx/callingx.ts +11 -8
  48. package/src/utils/push/libs/notifee/index.ts +0 -4
  49. package/src/version.ts +1 -1
@@ -54,10 +54,13 @@ export function getCallDisplayName(
54
54
  }
55
55
 
56
56
  function getCallDisplayNameFromCall(call: Call): string {
57
- return getCallDisplayName(
58
- call.state.members,
59
- call.state.participants,
60
- call.currentUserId,
57
+ return (
58
+ call.state.custom?.display_name ??
59
+ getCallDisplayName(
60
+ call.state.members,
61
+ call.state.participants,
62
+ call.currentUserId,
63
+ )
61
64
  );
62
65
  }
63
66
 
@@ -77,7 +80,7 @@ export async function registerOutgoingCall(call: Call) {
77
80
  logger.debug(`registerOutgoingCall: Registering outgoing call ${call.cid}`);
78
81
  await CallingxModule.startCall(
79
82
  call.cid, // unique id for call
80
- call.id, // phone number for display in dialer (we use call id as phone number)
83
+ call.state.createdBy?.id ?? getCallDisplayNameFromCall(call), // handle for native call UI (prefer createdBy user id, fallback to call display name)
81
84
  getCallDisplayNameFromCall(call), // display name for display in call screen
82
85
  call.state.settings?.video?.enabled ?? false, // is video call?
83
86
  );
@@ -110,11 +113,11 @@ export async function joinCallingxCall(call: Call, activeCalls: Call[]) {
110
113
  isOutcomingCall ||
111
114
  (!call.ringing && CallingxModule.isOngoingCallsEnabled)
112
115
  ) {
113
- logger.debug(`joinCallingxCall: Joining call ${call.cid}`);
114
116
  try {
117
+ logger.debug(`joinCallingxCall: Joining call ${call.cid}`);
115
118
  await CallingxModule.startCall(
116
119
  call.cid, // unique id for call
117
- call.id, // phone number for display in dialer (we use call id as phone number)
120
+ call.state.createdBy?.id ?? getCallDisplayNameFromCall(call), // handle for native call UI (prefer createdBy user id, fallback to call display name)
118
121
  getCallDisplayNameFromCall(call), // display name for display in call screen
119
122
  call.state.settings?.video?.enabled ?? false, // is video call?
120
123
  );
@@ -153,7 +156,7 @@ export async function joinCallingxCall(call: Call, activeCalls: Call[]) {
153
156
  // iOS early-returns with no error, Android sends the registered broadcast.
154
157
  await CallingxModule.displayIncomingCall(
155
158
  call.cid, // unique id for call
156
- call.id, // phone number for display in dialer (we use call id as phone number)
159
+ call.state.createdBy?.id ?? getCallDisplayNameFromCall(call), // handle for native call UI (prefer createdBy user id, fallback to call display name)
157
160
  getCallDisplayNameFromCall(call), // display name for display in call screen
158
161
  call.state.settings?.video?.enabled ?? false, // is video call?
159
162
  );
@@ -33,10 +33,6 @@ export function getNotifeeLibThrowIfNotInstalledForPush() {
33
33
  return lib;
34
34
  }
35
35
 
36
- export function getNotifeeLibNoThrowForKeepCallAlive() {
37
- return lib;
38
- }
39
-
40
36
  export function getIncomingCallForegroundServiceTypes() {
41
37
  const types: AndroidForegroundServiceType[] = [
42
38
  AndroidForegroundServiceType.FOREGROUND_SERVICE_TYPE_SHORT_SERVICE,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '1.31.1-beta.0';
1
+ export const version = '1.32.0';