@stream-io/video-react-native-sdk 0.7.22 → 0.7.24

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 (114) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/commonjs/components/Call/CallControls/AcceptCallButton.js +3 -1
  3. package/dist/commonjs/components/Call/CallControls/AcceptCallButton.js.map +1 -1
  4. package/dist/commonjs/components/Call/CallControls/HangupCallButton.js +3 -2
  5. package/dist/commonjs/components/Call/CallControls/HangupCallButton.js.map +1 -1
  6. package/dist/commonjs/components/Call/CallControls/RejectCallButton.js +2 -1
  7. package/dist/commonjs/components/Call/CallControls/RejectCallButton.js.map +1 -1
  8. package/dist/commonjs/components/Call/CallControls/internal/ReactionsPicker.js +3 -1
  9. package/dist/commonjs/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
  10. package/dist/commonjs/components/Call/Lobby/JoinCallButton.js +3 -1
  11. package/dist/commonjs/components/Call/Lobby/JoinCallButton.js.map +1 -1
  12. package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js +4 -2
  13. package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -1
  14. package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js +3 -1
  15. package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js.map +1 -1
  16. package/dist/commonjs/components/Livestream/LivestreamPlayer/LivestreamPlayer.js +20 -4
  17. package/dist/commonjs/components/Livestream/LivestreamPlayer/LivestreamPlayer.js.map +1 -1
  18. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +3 -1
  19. package/dist/commonjs/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
  20. package/dist/commonjs/contexts/BackgroundFilters.js +1 -3
  21. package/dist/commonjs/contexts/BackgroundFilters.js.map +1 -1
  22. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +9 -5
  23. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  24. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +4 -2
  25. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  26. package/dist/commonjs/hooks/usePermissionRequest.js +2 -1
  27. package/dist/commonjs/hooks/usePermissionRequest.js.map +1 -1
  28. package/dist/commonjs/utils/getAndroidDefaultRingtoneUrl.js +3 -1
  29. package/dist/commonjs/utils/getAndroidDefaultRingtoneUrl.js.map +1 -1
  30. package/dist/commonjs/utils/push/android.js +7 -4
  31. package/dist/commonjs/utils/push/android.js.map +1 -1
  32. package/dist/commonjs/utils/push/ios.js +4 -2
  33. package/dist/commonjs/utils/push/ios.js.map +1 -1
  34. package/dist/commonjs/utils/push/libs/firebaseMessaging.js +3 -1
  35. package/dist/commonjs/utils/push/libs/firebaseMessaging.js.map +1 -1
  36. package/dist/commonjs/utils/push/utils.js +8 -4
  37. package/dist/commonjs/utils/push/utils.js.map +1 -1
  38. package/dist/commonjs/version.js +1 -1
  39. package/dist/module/components/Call/CallControls/AcceptCallButton.js +3 -1
  40. package/dist/module/components/Call/CallControls/AcceptCallButton.js.map +1 -1
  41. package/dist/module/components/Call/CallControls/HangupCallButton.js +3 -1
  42. package/dist/module/components/Call/CallControls/HangupCallButton.js.map +1 -1
  43. package/dist/module/components/Call/CallControls/RejectCallButton.js +3 -2
  44. package/dist/module/components/Call/CallControls/RejectCallButton.js.map +1 -1
  45. package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js +3 -1
  46. package/dist/module/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
  47. package/dist/module/components/Call/Lobby/JoinCallButton.js +3 -1
  48. package/dist/module/components/Call/Lobby/JoinCallButton.js.map +1 -1
  49. package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js +5 -3
  50. package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -1
  51. package/dist/module/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js +3 -1
  52. package/dist/module/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js.map +1 -1
  53. package/dist/module/components/Livestream/LivestreamPlayer/LivestreamPlayer.js +20 -4
  54. package/dist/module/components/Livestream/LivestreamPlayer/LivestreamPlayer.js.map +1 -1
  55. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +3 -1
  56. package/dist/module/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
  57. package/dist/module/contexts/BackgroundFilters.js +1 -3
  58. package/dist/module/contexts/BackgroundFilters.js.map +1 -1
  59. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +10 -6
  60. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  61. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +5 -3
  62. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  63. package/dist/module/hooks/usePermissionRequest.js +3 -2
  64. package/dist/module/hooks/usePermissionRequest.js.map +1 -1
  65. package/dist/module/utils/getAndroidDefaultRingtoneUrl.js +3 -1
  66. package/dist/module/utils/getAndroidDefaultRingtoneUrl.js.map +1 -1
  67. package/dist/module/utils/push/android.js +8 -5
  68. package/dist/module/utils/push/android.js.map +1 -1
  69. package/dist/module/utils/push/ios.js +4 -2
  70. package/dist/module/utils/push/ios.js.map +1 -1
  71. package/dist/module/utils/push/libs/firebaseMessaging.js +3 -1
  72. package/dist/module/utils/push/libs/firebaseMessaging.js.map +1 -1
  73. package/dist/module/utils/push/utils.js +9 -5
  74. package/dist/module/utils/push/utils.js.map +1 -1
  75. package/dist/module/version.js +1 -1
  76. package/dist/typescript/components/Call/CallControls/AcceptCallButton.d.ts.map +1 -1
  77. package/dist/typescript/components/Call/CallControls/HangupCallButton.d.ts.map +1 -1
  78. package/dist/typescript/components/Call/CallControls/RejectCallButton.d.ts.map +1 -1
  79. package/dist/typescript/components/Call/CallControls/internal/ReactionsPicker.d.ts.map +1 -1
  80. package/dist/typescript/components/Call/Lobby/JoinCallButton.d.ts.map +1 -1
  81. package/dist/typescript/components/Livestream/LivestreamControls/HostStartStreamButton.d.ts.map +1 -1
  82. package/dist/typescript/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.d.ts.map +1 -1
  83. package/dist/typescript/components/Livestream/LivestreamPlayer/LivestreamPlayer.d.ts.map +1 -1
  84. package/dist/typescript/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.d.ts.map +1 -1
  85. package/dist/typescript/contexts/BackgroundFilters.d.ts.map +1 -1
  86. package/dist/typescript/hooks/push/useIosVoipPushEventsSetupEffect.d.ts.map +1 -1
  87. package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
  88. package/dist/typescript/hooks/usePermissionRequest.d.ts.map +1 -1
  89. package/dist/typescript/utils/getAndroidDefaultRingtoneUrl.d.ts.map +1 -1
  90. package/dist/typescript/utils/push/android.d.ts.map +1 -1
  91. package/dist/typescript/utils/push/ios.d.ts.map +1 -1
  92. package/dist/typescript/utils/push/libs/firebaseMessaging.d.ts.map +1 -1
  93. package/dist/typescript/utils/push/utils.d.ts.map +1 -1
  94. package/dist/typescript/version.d.ts +1 -1
  95. package/package.json +3 -3
  96. package/src/components/Call/CallControls/AcceptCallButton.tsx +3 -1
  97. package/src/components/Call/CallControls/HangupCallButton.tsx +3 -1
  98. package/src/components/Call/CallControls/RejectCallButton.tsx +3 -2
  99. package/src/components/Call/CallControls/internal/ReactionsPicker.tsx +3 -2
  100. package/src/components/Call/Lobby/JoinCallButton.tsx +3 -1
  101. package/src/components/Livestream/LivestreamControls/HostStartStreamButton.tsx +5 -3
  102. package/src/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.tsx +3 -1
  103. package/src/components/Livestream/LivestreamPlayer/LivestreamPlayer.tsx +21 -4
  104. package/src/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.tsx +4 -1
  105. package/src/contexts/BackgroundFilters.tsx +1 -3
  106. package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +10 -6
  107. package/src/hooks/useAndroidKeepCallAliveEffect.ts +6 -3
  108. package/src/hooks/usePermissionRequest.tsx +7 -2
  109. package/src/utils/getAndroidDefaultRingtoneUrl.ts +3 -1
  110. package/src/utils/push/android.ts +15 -5
  111. package/src/utils/push/ios.ts +4 -3
  112. package/src/utils/push/libs/firebaseMessaging.ts +5 -1
  113. package/src/utils/push/utils.ts +18 -5
  114. package/src/version.ts +1 -1
@@ -15,7 +15,7 @@ import {
15
15
  processCallFromPushInBackground,
16
16
  } from './utils';
17
17
  import { getExpoNotificationsLib, getPushNotificationIosLib } from './libs';
18
- import { StreamVideoClient } from '@stream-io/video-client';
18
+ import { StreamVideoClient, getLogger } from '@stream-io/video-client';
19
19
  import { setPushLogoutCallback } from '../internal/pushLogoutCallback';
20
20
  import notifee, { EventType } from '@notifee/react-native';
21
21
 
@@ -139,9 +139,10 @@ export async function initIosNonVoipToken(
139
139
  const setDeviceToken = async (token: string) => {
140
140
  setPushLogoutCallback(async () => {
141
141
  try {
142
- client.removeDevice(token);
142
+ await client.removeDevice(token);
143
143
  } catch (err) {
144
- console.warn('Failed to remove apn token from stream', err);
144
+ const logger = getLogger(['initIosNonVoipToken']);
145
+ logger('warn', 'Failed to remove apn token from stream', err);
145
146
  }
146
147
  });
147
148
  const push_provider_name = pushConfig.ios.pushProviderName;
@@ -1,3 +1,5 @@
1
+ import { getLogger } from '@stream-io/video-client';
2
+
1
3
  export type { FirebaseMessagingTypes } from '@react-native-firebase/messaging';
2
4
  export type FirebaseMessagingType =
3
5
  typeof import('@react-native-firebase/messaging').default;
@@ -22,7 +24,9 @@ export function getFirebaseMessagingLib() {
22
24
 
23
25
  export function getFirebaseMessagingLibNoThrow(isExpo: boolean) {
24
26
  if (!messaging) {
25
- console.warn(
27
+ const logger = getLogger(['getFirebaseMessagingLibNoThrow']);
28
+ logger(
29
+ 'warn',
26
30
  `${
27
31
  isExpo
28
32
  ? 'In Expo, @react-native-firebase/messaging library is required to receive ringing notifications in app killed state for Android.'
@@ -1,4 +1,9 @@
1
- import { Call, RxUtils, StreamVideoClient } from '@stream-io/video-client';
1
+ import {
2
+ Call,
3
+ RxUtils,
4
+ StreamVideoClient,
5
+ getLogger,
6
+ } from '@stream-io/video-client';
2
7
  import type {
3
8
  NonRingingPushEvent,
4
9
  StreamVideoConfig,
@@ -71,7 +76,8 @@ export const processCallFromPushInBackground = async (
71
76
  return;
72
77
  }
73
78
  } catch (e) {
74
- console.log('failed to create video client and connect user', e);
79
+ const logger = getLogger(['processCallFromPushInBackground']);
80
+ logger('error', 'failed to create video client', e);
75
81
  return;
76
82
  }
77
83
  await processCallFromPush(videoClient, call_cid, action);
@@ -93,7 +99,8 @@ export const processCallFromPush = async (
93
99
  try {
94
100
  callFromPush = await client.onRingingCall(call_cid);
95
101
  } catch (e) {
96
- console.log('failed to fetch call from push notification', e);
102
+ const logger = getLogger(['processCallFromPush']);
103
+ logger('error', 'failed to fetch call from push notification', e);
97
104
  return;
98
105
  }
99
106
  // note: when action was pressed or delivered, we dont need to do anything as the only thing is to do is to get the call which adds it to the client
@@ -104,7 +111,12 @@ export const processCallFromPush = async (
104
111
  await callFromPush.leave({ reject: true });
105
112
  }
106
113
  } catch (e) {
107
- console.log('failed to process call from push notification', e, action);
114
+ const logger = getLogger(['processCallFromPush']);
115
+ logger(
116
+ 'error',
117
+ `failed to process ${action} call from push notification`,
118
+ e
119
+ );
108
120
  }
109
121
  };
110
122
 
@@ -132,7 +144,8 @@ export const processNonIncomingCallFromPush = async (
132
144
  await callFromPush.get();
133
145
  }
134
146
  } catch (e) {
135
- console.log('failed to fetch call from push notification', e);
147
+ const logger = getLogger(['processNonIncomingCallFromPush']);
148
+ logger('error', 'failed to fetch call from push notification', e);
136
149
  return;
137
150
  }
138
151
  onNewCallNotification(callFromPush, nonRingingNotificationType);
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '0.7.22';
1
+ export const version = '0.7.24';