agora-appbuilder-core 4.0.0-beta.41 → 4.0.0-beta.43

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 (142) hide show
  1. package/package.json +2 -2
  2. package/template/Gulpfile.js +3 -3
  3. package/template/_package-lock.json +65 -0
  4. package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +18 -3
  5. package/template/agora-rn-uikit/src/Controls/BtnTemplate.tsx +1 -0
  6. package/template/agora-rn-uikit/src/Controls/Icons.ts +1 -1
  7. package/template/agora-rn-uikit/src/Controls/Local/EndCall.tsx +6 -4
  8. package/template/agora-rn-uikit/src/Controls/Local/FullScreen.tsx +3 -1
  9. package/template/agora-rn-uikit/src/Controls/Local/LocalAudioMute.tsx +1 -0
  10. package/template/agora-rn-uikit/src/Controls/Local/LocalVideoMute.tsx +1 -0
  11. package/template/agora-rn-uikit/src/Controls/Local/SwitchCamera.tsx +1 -0
  12. package/template/agora-rn-uikit/src/Controls/Remote/RemoteAudioMute.tsx +1 -0
  13. package/template/agora-rn-uikit/src/Controls/Remote/RemoteSwap.tsx +3 -1
  14. package/template/agora-rn-uikit/src/Controls/Remote/RemoteVideoMute.tsx +1 -0
  15. package/template/agora-rn-uikit/src/Reducer/LocalMuteAudio.ts +1 -1
  16. package/template/agora-rn-uikit/src/Reducer/LocalMuteVideo.ts +1 -1
  17. package/template/agora-rn-uikit/src/Reducer/LocalPermissionState.ts +1 -1
  18. package/template/agora-rn-uikit/src/Reducer/RemoteAudioStateChanged.ts +3 -3
  19. package/template/agora-rn-uikit/src/Reducer/RemoteVideoStateChanged.ts +5 -4
  20. package/template/agora-rn-uikit/src/Reducer/UpdateDualStreamMode.ts +1 -1
  21. package/template/agora-rn-uikit/src/Reducer/UserJoined.ts +8 -5
  22. package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteAudio.ts +1 -1
  23. package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteVideo.ts +1 -1
  24. package/template/agora-rn-uikit/src/Reducer/UserOffline.ts +1 -1
  25. package/template/agora-rn-uikit/src/Rtc/Create.tsx +31 -15
  26. package/template/agora-rn-uikit/src/Rtc/Join.tsx +2 -0
  27. package/template/agora-rn-uikit/src/Views/MaxVideoView.native.tsx +8 -2
  28. package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +4 -5
  29. package/template/agora-rn-uikit/src/Views/MinVideoView.tsx +2 -0
  30. package/template/android/app/src/main/AndroidManifest.xml +6 -18
  31. package/template/android/app/src/main/assets/fonts/icomoon.ttf +0 -0
  32. package/template/bridge/rtc/webNg/index.ts +72 -1
  33. package/template/customization-api/typeDefinition.ts +1 -0
  34. package/template/customization-implementation/index.ts +0 -1
  35. package/template/global.d.ts +1 -0
  36. package/template/package.json +3 -1
  37. package/template/src/App.tsx +10 -10
  38. package/template/src/AppWrapper.tsx +4 -2
  39. package/template/src/SDKAppWrapper.tsx +4 -4
  40. package/template/src/assets/font-styles.css +92 -0
  41. package/template/src/assets/fonts/icomoon.ttf +0 -0
  42. package/template/src/assets/selection.json +1 -1
  43. package/template/src/atoms/Carousel.native.tsx +3 -3
  44. package/template/src/atoms/Carousel.tsx +2 -3
  45. package/template/src/atoms/CircularProgress.tsx +0 -1
  46. package/template/src/atoms/CustomIcon.tsx +24 -0
  47. package/template/src/atoms/IconButton.tsx +50 -8
  48. package/template/src/atoms/ImageIcon.tsx +6 -3
  49. package/template/src/atoms/InlineNotification.tsx +49 -15
  50. package/template/src/atoms/PrimaryButton.tsx +3 -2
  51. package/template/src/atoms/SecondaryButton.tsx +2 -0
  52. package/template/src/atoms/Spacer.tsx +1 -0
  53. package/template/src/atoms/TextInput.tsx +2 -1
  54. package/template/src/atoms/Toolbar.tsx +5 -1
  55. package/template/src/atoms/ToolbarItem.tsx +4 -4
  56. package/template/src/atoms/Tooltip.tsx +26 -4
  57. package/template/src/auth/AuthProvider.tsx +0 -8
  58. package/template/src/auth/IDPAuth.electron.tsx +0 -1
  59. package/template/src/auth/useTokenAuth.tsx +10 -8
  60. package/template/src/components/Chat.tsx +1 -0
  61. package/template/src/components/ColorConfigure.tsx +0 -1
  62. package/template/src/components/Controls.tsx +50 -56
  63. package/template/src/components/DeviceConfigure.tsx +8 -4
  64. package/template/src/components/EventsConfigure.tsx +72 -26
  65. package/template/src/components/GraphQLProvider.tsx +5 -3
  66. package/template/src/components/JoinPhrase.tsx +0 -1
  67. package/template/src/components/ParticipantsView.tsx +1 -0
  68. package/template/src/components/PinnedVideo.tsx +9 -6
  69. package/template/src/components/Precall.native.tsx +128 -60
  70. package/template/src/components/Precall.tsx +54 -50
  71. package/template/src/components/RTMConfigure.tsx +38 -19
  72. package/template/src/components/SessionContext.tsx +0 -1
  73. package/template/src/components/SettingsView.tsx +30 -6
  74. package/template/src/components/chat-messages/useChatMessages.tsx +9 -1
  75. package/template/src/components/contexts/ScreenShareContext.tsx +1 -0
  76. package/template/src/components/contexts/WaitingRoomContext.tsx +1 -0
  77. package/template/src/components/livestream/LiveStreamContext.tsx +1 -0
  78. package/template/src/components/livestream/views/LiveStreamAttendeeLandingTile.tsx +2 -1
  79. package/template/src/components/participants/UserActionMenuOptions.tsx +6 -0
  80. package/template/src/components/popups/WhiteboardClearAllPopup.tsx +113 -0
  81. package/template/src/components/precall/LocalMute.tsx +17 -34
  82. package/template/src/components/precall/PermissionHelper.tsx +9 -3
  83. package/template/src/components/precall/PreCallSettings.tsx +1 -0
  84. package/template/src/components/precall/VideoFallback.tsx +167 -0
  85. package/template/src/components/precall/VideoPreview.native.tsx +16 -50
  86. package/template/src/components/precall/VideoPreview.tsx +26 -300
  87. package/template/src/components/precall/meetingTitle.tsx +30 -10
  88. package/template/src/components/precall/selectDevice.tsx +4 -1
  89. package/template/src/components/precall/textInput.tsx +1 -1
  90. package/template/src/components/room-info/useRoomInfo.tsx +5 -0
  91. package/template/src/components/useShareLink.tsx +4 -1
  92. package/template/src/components/useVideoCall.tsx +10 -0
  93. package/template/src/components/virtual-background/VBButton.tsx +51 -24
  94. package/template/src/components/virtual-background/VBCard.native.tsx +258 -0
  95. package/template/src/components/virtual-background/VBCard.tsx +248 -0
  96. package/template/src/components/virtual-background/VBPanel.tsx +125 -287
  97. package/template/src/components/virtual-background/VButils.native.ts +37 -0
  98. package/template/src/components/virtual-background/VButils.ts +104 -0
  99. package/template/src/components/virtual-background/VideoPreview.native.tsx +42 -0
  100. package/template/src/components/virtual-background/VideoPreview.tsx +51 -94
  101. package/template/src/components/virtual-background/imagePaths.ts +63 -0
  102. package/template/src/components/virtual-background/useVB.native.tsx +157 -37
  103. package/template/src/components/virtual-background/useVB.tsx +57 -114
  104. package/template/src/components/whiteboard/StrokeWidthTool.tsx +135 -0
  105. package/template/src/components/whiteboard/WhiteboardButton.tsx +6 -11
  106. package/template/src/components/whiteboard/WhiteboardCanvas.tsx +24 -13
  107. package/template/src/components/whiteboard/WhiteboardConfigure.native.tsx +95 -4
  108. package/template/src/components/whiteboard/WhiteboardConfigure.tsx +276 -6
  109. package/template/src/components/whiteboard/WhiteboardCursor.tsx +152 -0
  110. package/template/src/components/whiteboard/WhiteboardToolBox.tsx +1106 -577
  111. package/template/src/components/whiteboard/WhiteboardView.tsx +2 -2
  112. package/template/src/components/whiteboard/WhiteboardWidget.tsx +549 -0
  113. package/template/src/components/whiteboard/WhiteboardWrapper.tsx +26 -14
  114. package/template/src/pages/video-call/ActionSheet.native.tsx +1 -1
  115. package/template/src/pages/video-call/ActionSheet.tsx +1 -1
  116. package/template/src/pages/video-call/ActionSheetContent.tsx +79 -76
  117. package/template/src/pages/video-call/NameWithMicIcon.tsx +7 -1
  118. package/template/src/pages/video-call/RenderComponent.tsx +1 -0
  119. package/template/src/pages/video-call/SidePanelHeader.tsx +1 -1
  120. package/template/src/pages/video-call/VideoCallMobileView.tsx +40 -24
  121. package/template/src/pages/video-call/VideoCallScreen.tsx +16 -6
  122. package/template/src/pages/video-call/VideoRenderer.tsx +60 -13
  123. package/template/src/rtm-events/constants.ts +7 -0
  124. package/template/src/rtm-events-api/Events.ts +2 -0
  125. package/template/src/rtm-events-api/LocalEvents.ts +5 -0
  126. package/template/src/subComponents/ChatContainer.tsx +4 -1
  127. package/template/src/subComponents/Checkbox.native.tsx +46 -46
  128. package/template/src/subComponents/Checkbox.tsx +7 -6
  129. package/template/src/subComponents/LanguageSelector.tsx +5 -4
  130. package/template/src/subComponents/LayoutIconButton.tsx +1 -0
  131. package/template/src/subComponents/LocalEndCall.tsx +1 -1
  132. package/template/src/subComponents/LocalSwitchCamera.tsx +16 -2
  133. package/template/src/subComponents/SelectDevice.tsx +14 -2
  134. package/template/src/subComponents/SidePanelHeader.tsx +1 -1
  135. package/template/src/subComponents/caption/CaptionContainer.tsx +1 -0
  136. package/template/src/subComponents/caption/Transcript.tsx +1 -0
  137. package/template/src/subComponents/livestream/controls/RemoteLiveStreamApprovedRequestRecall.tsx +1 -0
  138. package/template/src/utils/SdkMethodEvents.ts +5 -5
  139. package/template/src/utils/common.tsx +28 -0
  140. package/template/src/utils/useFindActiveSpeaker.ts +1 -0
  141. package/template/src/utils/useIsLocalUserSpeaking.ts +14 -5
  142. package/template/src/utils/useMuteToggleLocal.ts +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-appbuilder-core",
3
- "version": "4.0.0-beta.41",
3
+ "version": "4.0.0-beta.43",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "scripts": {
11
11
  "vercel-build": "npm run dev-setup && cd template && npm run web:build && cd .. && npm run copy-vercel",
12
- "uikit": "rm -rf template/agora-rn-uikit && git clone https://github.com/AgoraIO-Community/ReactNative-UIKit.git template/agora-rn-uikit && cd template/agora-rn-uikit && git checkout active-speaker-layout-change",
12
+ "uikit": "rm -rf template/agora-rn-uikit && git clone https://github.com/AgoraIO-Community/ReactNative-UIKit.git template/agora-rn-uikit && cd template/agora-rn-uikit && git checkout v3-release-ui-kit",
13
13
  "deps": "cd template && npm i",
14
14
  "dev-setup": "npm run uikit && npm run deps && node devSetup.js",
15
15
  "web-build": "cd template && npm run web:build && cd .. && npm run copy-vercel",
@@ -251,12 +251,12 @@ const reactSdk = {
251
251
  const cli = debugFlag ? runCli : runCliNoOutput;
252
252
  cli(
253
253
  //'npx -p typescript tsc index.rsdk.tsx --declaration --emitDeclarationOnly --noResolve --outFile ../Builds/temp.d.ts',
254
- 'npx -p typescript tsc --project tsconfig_rsdk_index.json --noResolve --outFile ../Builds/reactSdk.d.ts',
254
+ 'npx -p typescript tsc --project tsconfig_rsdk_index.json --outFile ../Builds/reactSdk.d.ts',
255
255
  () => cb(),
256
256
  );
257
257
  },
258
258
  bundleSdkTypedefs: () => {
259
- return src(['../Builds/customization-api.d.ts', './static.d.ts'])
259
+ return src(['../Builds/customization-api.d.ts', '../Builds/reactSdk.d.ts'])
260
260
  .pipe(concat('index.d.ts'))
261
261
  .pipe(
262
262
  replace(
@@ -358,7 +358,7 @@ module.exports.reactSdk = series(
358
358
  reactSdk.webpack,
359
359
  general.generateApiTypedefs,
360
360
  general.bundleApiTypedefs,
361
- // reactSdk.generateSdkTypedefs,
361
+ reactSdk.generateSdkTypedefs,
362
362
  reactSdk.bundleSdkTypedefs,
363
363
  general.cleanTempFiles,
364
364
  general.generateNpmPackage,
@@ -40,7 +40,9 @@
40
40
  "react-is": "18.0.0",
41
41
  "react-native": "0.72.4",
42
42
  "react-native-agora": "3.7.2-rc.3",
43
+ "react-native-document-picker": "^9.1.0",
43
44
  "react-native-exit-app": "1.1.0",
45
+ "react-native-fs": "^2.20.0",
44
46
  "react-native-gesture-handler": "2.8.0",
45
47
  "react-native-hyperlink": "0.0.19",
46
48
  "react-native-inappbrowser-reborn": "3.5.1",
@@ -25734,11 +25736,47 @@
25734
25736
  "ieee754": "^1.2.1"
25735
25737
  }
25736
25738
  },
25739
+ "node_modules/react-native-document-picker": {
25740
+ "version": "9.1.0",
25741
+ "resolved": "https://registry.npmjs.org/react-native-document-picker/-/react-native-document-picker-9.1.0.tgz",
25742
+ "integrity": "sha512-SRKPIAzUtcPDUstLRhQeebVVM+x+1I24iSvoy5mFp1KAD+6+UyDEle0SoD96k7MxVH5o46wPifWCYOA3FuQOyw==",
25743
+ "dependencies": {
25744
+ "invariant": "^2.2.4"
25745
+ },
25746
+ "peerDependencies": {
25747
+ "react": "*",
25748
+ "react-native": "*",
25749
+ "react-native-windows": "*"
25750
+ },
25751
+ "peerDependenciesMeta": {
25752
+ "react-native-windows": {
25753
+ "optional": true
25754
+ }
25755
+ }
25756
+ },
25737
25757
  "node_modules/react-native-exit-app": {
25738
25758
  "version": "1.1.0",
25739
25759
  "resolved": "https://registry.npmjs.org/react-native-exit-app/-/react-native-exit-app-1.1.0.tgz",
25740
25760
  "integrity": "sha512-Spne19zfMfJvnUTX909EHUqWMk69rATtLJq9XMBGpNSHhx0M7v5yetx2Z87egBhLOqQm+CWfD/oxWzDG8rbIQA=="
25741
25761
  },
25762
+ "node_modules/react-native-fs": {
25763
+ "version": "2.20.0",
25764
+ "resolved": "https://registry.npmjs.org/react-native-fs/-/react-native-fs-2.20.0.tgz",
25765
+ "integrity": "sha512-VkTBzs7fIDUiy/XajOSNk0XazFE9l+QlMAce7lGuebZcag5CnjszB+u4BdqzwaQOdcYb5wsJIsqq4kxInIRpJQ==",
25766
+ "dependencies": {
25767
+ "base-64": "^0.1.0",
25768
+ "utf8": "^3.0.0"
25769
+ },
25770
+ "peerDependencies": {
25771
+ "react-native": "*",
25772
+ "react-native-windows": "*"
25773
+ },
25774
+ "peerDependenciesMeta": {
25775
+ "react-native-windows": {
25776
+ "optional": true
25777
+ }
25778
+ }
25779
+ },
25742
25780
  "node_modules/react-native-gesture-handler": {
25743
25781
  "version": "2.8.0",
25744
25782
  "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.8.0.tgz",
@@ -30201,6 +30239,11 @@
30201
30239
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
30202
30240
  }
30203
30241
  },
30242
+ "node_modules/utf8": {
30243
+ "version": "3.0.0",
30244
+ "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz",
30245
+ "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ=="
30246
+ },
30204
30247
  "node_modules/utf8-byte-length": {
30205
30248
  "version": "1.0.4",
30206
30249
  "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
@@ -50711,11 +50754,28 @@
50711
50754
  }
50712
50755
  }
50713
50756
  },
50757
+ "react-native-document-picker": {
50758
+ "version": "9.1.0",
50759
+ "resolved": "https://registry.npmjs.org/react-native-document-picker/-/react-native-document-picker-9.1.0.tgz",
50760
+ "integrity": "sha512-SRKPIAzUtcPDUstLRhQeebVVM+x+1I24iSvoy5mFp1KAD+6+UyDEle0SoD96k7MxVH5o46wPifWCYOA3FuQOyw==",
50761
+ "requires": {
50762
+ "invariant": "^2.2.4"
50763
+ }
50764
+ },
50714
50765
  "react-native-exit-app": {
50715
50766
  "version": "1.1.0",
50716
50767
  "resolved": "https://registry.npmjs.org/react-native-exit-app/-/react-native-exit-app-1.1.0.tgz",
50717
50768
  "integrity": "sha512-Spne19zfMfJvnUTX909EHUqWMk69rATtLJq9XMBGpNSHhx0M7v5yetx2Z87egBhLOqQm+CWfD/oxWzDG8rbIQA=="
50718
50769
  },
50770
+ "react-native-fs": {
50771
+ "version": "2.20.0",
50772
+ "resolved": "https://registry.npmjs.org/react-native-fs/-/react-native-fs-2.20.0.tgz",
50773
+ "integrity": "sha512-VkTBzs7fIDUiy/XajOSNk0XazFE9l+QlMAce7lGuebZcag5CnjszB+u4BdqzwaQOdcYb5wsJIsqq4kxInIRpJQ==",
50774
+ "requires": {
50775
+ "base-64": "^0.1.0",
50776
+ "utf8": "^3.0.0"
50777
+ }
50778
+ },
50719
50779
  "react-native-gesture-handler": {
50720
50780
  "version": "2.8.0",
50721
50781
  "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.8.0.tgz",
@@ -54060,6 +54120,11 @@
54060
54120
  "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==",
54061
54121
  "requires": {}
54062
54122
  },
54123
+ "utf8": {
54124
+ "version": "3.0.0",
54125
+ "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz",
54126
+ "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ=="
54127
+ },
54063
54128
  "utf8-byte-length": {
54064
54129
  "version": "1.0.4",
54065
54130
  "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import {StyleProp, ViewStyle} from 'react-native';
3
- import {RtcEngineEvents} from 'react-native-agora/lib/typescript/src/common/RtcEvents';
3
+ import {RtcEngineEvents} from 'react-native-agora/lib/typescript/common/RtcEvents';
4
4
  import {EncryptionMode} from 'react-native-agora';
5
5
  import {VideoProfile} from '../Utils/quality';
6
6
  import {UidType} from './RtcContext';
@@ -46,6 +46,7 @@ export const toggleHelper = (state: ToggleState) =>
46
46
  state === ToggleState.enabled ? ToggleState.disabled : ToggleState.enabled;
47
47
 
48
48
  export interface DefaultContentInterface {
49
+ //uikit and core
49
50
  uid: UidType;
50
51
  audio: ToggleState;
51
52
  video: ToggleState;
@@ -54,6 +55,15 @@ export interface DefaultContentInterface {
54
55
  permissionStatus?: PermissionState;
55
56
  //applicable only to the screenshare
56
57
  parentUid?: UidType;
58
+ //uikit and core
59
+
60
+ //core only
61
+ name: string;
62
+ screenUid: number;
63
+ offline: boolean;
64
+ lastMessageTimeStamp: number;
65
+ isInWaitingRoom?: boolean;
66
+ //core only
57
67
  }
58
68
  export interface CustomContentInterface<T> {
59
69
  type: T extends DefaultContentInterface['type'] ? never : T;
@@ -123,6 +133,11 @@ export interface RtcPropsInterface {
123
133
  geoFencing?: boolean;
124
134
  audioRoom?: boolean;
125
135
  activeSpeaker?: boolean;
136
+
137
+ //core only
138
+ screenShareUid?: number;
139
+ screenShareToken?: string;
140
+ //core only
126
141
  }
127
142
 
128
143
  export interface CallbacksInterface {
@@ -161,7 +176,7 @@ export interface PropsInterface {
161
176
  mode?: ChannelProfile;
162
177
  }
163
178
 
164
- const initialValue: PropsInterface = {
179
+ const initialValue: Partial<PropsInterface> = {
165
180
  rtcProps: {
166
181
  appId: '',
167
182
  channel: '',
@@ -170,7 +185,7 @@ const initialValue: PropsInterface = {
170
185
  },
171
186
  };
172
187
 
173
- const PropsContext = React.createContext<PropsInterface>(initialValue);
188
+ const PropsContext = React.createContext<Partial<PropsInterface>>(initialValue);
174
189
 
175
190
  export const PropsProvider = PropsContext.Provider;
176
191
  export const PropsConsumer = PropsContext.Consumer;
@@ -26,6 +26,7 @@ interface BtnTemplateBasicInterface {
26
26
  disabled?: boolean;
27
27
  }
28
28
  interface BtnTemplateInterfaceWithName extends BtnTemplateBasicInterface {
29
+ //@ts-ignore
29
30
  name?: keyof IconsInterface;
30
31
  }
31
32
  interface BtnTemplateInterfaceWithIcon extends BtnTemplateBasicInterface {
@@ -29,7 +29,7 @@ const icons: IconsInterface = {
29
29
  'noise-cancellation':
30
30
  'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANxSURBVHgB7ZvxddowEMaPvv5fRlA2yAjuBMkGYYPSCeJMAJ0AMkGyAWzQdAKzAXSCr6dafjjGtiRbxgLu9949g5Fk+8vJOukUIkEQBEEQBEEQ/JlQBACY8uGRTZlTH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kXdrFTqJ/UEzE+pLbVp+reqF1Rv6rjkTfUl+ozdV8Vg4mIh9W36kK2UG2qi+qZnHhbfaXWona5iskR9V1evANvqiiurlcRf18UV/vVlno3Yr/aow7kxdULZQYfthEfVpfdxK+Iy+pwzF+qJB7k/DcfjPhE/aE2I29G/jjyO5m42igzyMSvqedjvKJOF3jT6kr2+SLW1Td53p6iQUppVW0BD4CPUV4DagVqDViNNb/VOrAAWLaDlrqWtWvU7qsb6g31aMQN9V7MD6mv46mXGfwVjz4/qA6o827FfNR74qAtqUNdxUM0L95WJ3NzY9ExY4U1FzNx9VwVk/3qLePKqAr1bPGgpQ7ElFIyOuo0cAo4BowAfcA68AVoAy+A59EcJ4GRlNKjMoM+4DZwEzgAfAeWgM8xbgCjwPEYf2Oz66ZSSt2vijCYiR85p06ovR14vTE/F/yHRU6nHfwEFoGrpW/zD7PAeEppsIpB98PSBSmlLZrbbh24/r8Gu9gx/gBohhCCgI16xQAAAABJRU5ErkJggg==',
@@ -3,22 +3,24 @@ import PropsContext from '../../Contexts/PropsContext';
3
3
  import RtcContext from '../../Contexts/RtcContext';
4
4
  import BtnTemplate from '../BtnTemplate';
5
5
  import styles from '../../Style';
6
+ import DispatchContext from '../../Contexts/DispatchContext';
6
7
 
7
- interface EndCallProps{
8
- btnText?: string
8
+ interface EndCallProps {
9
+ btnText?: string;
9
10
  }
10
11
 
11
12
  function EndCall(props?: EndCallProps) {
12
13
  const {styleProps} = useContext(PropsContext);
13
14
  const {localBtnStyles} = styleProps || {};
14
15
  const {endCall} = localBtnStyles || {};
15
- const {dispatch} = useContext(RtcContext);
16
+ const {dispatch} = useContext(DispatchContext);
16
17
 
17
18
  return (
18
19
  <BtnTemplate
20
+ //@ts-ignore
19
21
  name={'callEnd'}
20
22
  btnText={props?.btnText || 'Hang Up'}
21
- color='#FD0845'
23
+ color="#FD0845"
22
24
  style={{...styles.endCall, ...(endCall as object)}}
23
25
  onPress={() =>
24
26
  dispatch({
@@ -3,14 +3,16 @@ import PropsContext from '../../Contexts/PropsContext';
3
3
  import RtcContext from '../../Contexts/RtcContext';
4
4
  import BtnTemplate from '../BtnTemplate';
5
5
  import styles from '../../Style';
6
+ import DispatchContext from '../../Contexts/DispatchContext';
6
7
 
7
8
  function FullScreen() {
8
9
  const {styleProps} = useContext(PropsContext);
9
10
  const {localBtnStyles} = styleProps || {};
10
11
  const {fullScreen} = localBtnStyles || {};
11
- const {dispatch} = useContext(RtcContext);
12
+ const {dispatch} = useContext(DispatchContext);
12
13
  return (
13
14
  <BtnTemplate
15
+ //@ts-ignore
14
16
  name={'fullscreen'}
15
17
  style={{...styles.localBtn, ...(fullScreen as object)}}
16
18
  onPress={() => {
@@ -22,6 +22,7 @@ function LocalAudioMute(props: LocalAudioMuteProps) {
22
22
 
23
23
  return (
24
24
  <BtnTemplate
25
+ //@ts-ignore
25
26
  name={local.audio === ToggleState.enabled ? 'mic' : 'micOff'}
26
27
  btnText={btnText}
27
28
  style={{
@@ -23,6 +23,7 @@ function LocalVideoMute(props: LocalVideoMuteProps) {
23
23
 
24
24
  return (
25
25
  <BtnTemplate
26
+ //@ts-ignore
26
27
  name={local.video === ToggleState.enabled ? 'videocam' : 'videocamOff'}
27
28
  btnText={btnText}
28
29
  style={{
@@ -17,6 +17,7 @@ function SwitchCamera(props?: Props) {
17
17
  const local = useContext(LocalContext);
18
18
  return (
19
19
  <BtnTemplate
20
+ //@ts-ignore
20
21
  name={'switchCamera'}
21
22
  style={{...styles.localBtn, ...(switchCamera as object)}}
22
23
  btnText={props?.btnText || 'Switch'}
@@ -20,6 +20,7 @@ const RemoteAudioMute: React.FC<RemoteAudioMuteInterface> = (props) => {
20
20
  const localUid = useLocalUid();
21
21
  return props.user.uid !== localUid ? (
22
22
  <BtnTemplate
23
+ //@ts-ignore
23
24
  name={props.user.audio === ToggleState.enabled ? 'mic' : 'micOff'}
24
25
  style={{...styles.leftRemoteBtn, ...(muteRemoteAudio as object)}}
25
26
  onPress={() => {
@@ -4,19 +4,21 @@ import BtnTemplate from '../BtnTemplate';
4
4
  import styles from '../../Style';
5
5
  import PropsContext from '../../Contexts/PropsContext';
6
6
  import useLocalUid from '../../Utils/useLocalUid';
7
+ import DispatchContext from '../../Contexts/DispatchContext';
7
8
 
8
9
  interface RemoteSwapInterface {
9
10
  uid: UidType;
10
11
  }
11
12
 
12
13
  const RemoteSwap: React.FC<RemoteSwapInterface> = (props) => {
13
- const {dispatch} = useContext(RtcContext);
14
+ const {dispatch} = useContext(DispatchContext);
14
15
  const {styleProps} = useContext(PropsContext);
15
16
  const {remoteBtnStyles} = styleProps || {};
16
17
  const {remoteSwap} = remoteBtnStyles || {};
17
18
  const localUid = useLocalUid();
18
19
  return (
19
20
  <BtnTemplate
21
+ //@ts-ignore
20
22
  name={'remoteSwap'}
21
23
  style={
22
24
  props.uid !== localUid
@@ -21,6 +21,7 @@ const RemoteVideoMute: React.FC<RemoteVideoMuteInterface> = (props) => {
21
21
  const localUid = useLocalUid();
22
22
  return props.user.uid !== localUid ? (
23
23
  <BtnTemplate
24
+ //@ts-ignore
24
25
  name={
25
26
  props.user.video === ToggleState.enabled ? 'videocam' : 'videocamOff'
26
27
  }
@@ -9,7 +9,7 @@ export default function LocalMuteAudio(
9
9
  action: ActionType<'LocalMuteAudio'>,
10
10
  localUid: UidType,
11
11
  ) {
12
- let stateUpdate: ContentStateInterface = {
12
+ let stateUpdate: Partial<ContentStateInterface> = {
13
13
  defaultContent: {
14
14
  ...state.defaultContent,
15
15
  [localUid]: {
@@ -9,7 +9,7 @@ export default function LocalMuteVideo(
9
9
  action: ActionType<'LocalMuteVideo'>,
10
10
  localUid: UidType,
11
11
  ) {
12
- let stateUpdate: ContentStateInterface = {
12
+ let stateUpdate: Partial<ContentStateInterface> = {
13
13
  defaultContent: {
14
14
  ...state.defaultContent,
15
15
  [localUid]: {
@@ -9,7 +9,7 @@ export default function LocalPermissionState(
9
9
  action: ActionType<'LocalPermissionState'>,
10
10
  localUid: UidType,
11
11
  ) {
12
- let stateUpdate: ContentStateInterface = {
12
+ let stateUpdate: Partial<ContentStateInterface> = {
13
13
  defaultContent: {
14
14
  ...state.defaultContent,
15
15
  [localUid]: {
@@ -12,11 +12,11 @@ export default function RemoteAudioStateChanged(
12
12
  audioState = ToggleState.disabled;
13
13
  }
14
14
 
15
- const stateUpdate: ContentStateInterface = {
15
+ const stateUpdate: Partial<ContentStateInterface> = {
16
16
  defaultContent: {
17
17
  ...state.defaultContent,
18
- [action.value[0]]: {
19
- ...state.defaultContent[action.value[0]],
18
+ [action.value[0] as unknown as number]: {
19
+ ...state.defaultContent[action.value[0] as unknown as number],
20
20
  audio: audioState,
21
21
  },
22
22
  },
@@ -12,15 +12,16 @@ export default function RemoteVideoStateChanged(
12
12
  videoState = ToggleState.enabled;
13
13
  }
14
14
 
15
- const stateUpdate: ContentStateInterface = {
15
+ const stateUpdate: Partial<ContentStateInterface> = {
16
16
  defaultContent: {
17
17
  ...state.defaultContent,
18
- [action.value[0]]: {
19
- ...state.defaultContent[action.value[0]],
18
+ [action.value[0] as unknown as number]: {
19
+ ...state.defaultContent[action.value[0] as unknown as number],
20
20
  video:
21
+ //@ts-ignore
21
22
  videoState !== undefined
22
23
  ? videoState
23
- : state.defaultContent[action.value[0]].video,
24
+ : state.defaultContent[action.value[0] as unknown as number].video,
24
25
  },
25
26
  },
26
27
  activeUids: [...state.activeUids],
@@ -11,7 +11,7 @@ export default function UpdateDualStreamMode(
11
11
  ) {
12
12
  const newMode = action.value[0];
13
13
  let defaultContent = {...state.defaultContent};
14
- let stateUpdate: ContentStateInterface;
14
+ let stateUpdate: Partial<ContentStateInterface>;
15
15
  const setHighStreamType = (uid: UidType) => {
16
16
  defaultContent[uid].streamType = 'high';
17
17
  };
@@ -17,14 +17,17 @@ export default function UserJoined(
17
17
  let typeData = {
18
18
  type: 'rtc',
19
19
  };
20
- if (state.defaultContent[newUid] && 'type' in state.defaultContent[newUid]) {
21
- typeData.type = state.defaultContent[newUid].type;
20
+ if (
21
+ state.defaultContent[newUid as unknown as number] &&
22
+ 'type' in state.defaultContent[newUid as unknown as number]
23
+ ) {
24
+ typeData.type = state.defaultContent[newUid as unknown as number].type;
22
25
  }
23
26
 
24
27
  let defaultContent: ContentStateInterface['defaultContent'] = {
25
28
  ...state.defaultContent,
26
- [newUid]: {
27
- ...state.defaultContent[newUid],
29
+ [newUid as unknown as number]: {
30
+ ...state.defaultContent[newUid as unknown as number],
28
31
  uid: newUid,
29
32
  audio: ToggleState.disabled,
30
33
  video: ToggleState.disabled,
@@ -40,7 +43,7 @@ export default function UserJoined(
40
43
  //Only one remote and local is maximized
41
44
  //Change stream type to high if dualStreaMode is DYNAMIC
42
45
  if (dualStreamMode === DualStreamMode.DYNAMIC) {
43
- defaultContent[newUid].streamType = 'high';
46
+ defaultContent[newUid as unknown as number].streamType = 'high';
44
47
  }
45
48
  //Swap render positions
46
49
  stateUpdate = {
@@ -4,7 +4,7 @@ export default function UserMuteRemoteAudio(
4
4
  state: ContentStateInterface,
5
5
  action: ActionType<'UserMuteRemoteAudio'>,
6
6
  ) {
7
- let stateUpdate: ContentStateInterface = {
7
+ let stateUpdate: Partial<ContentStateInterface> = {
8
8
  defaultContent: {
9
9
  ...state.defaultContent,
10
10
  [action.value[0]]: {
@@ -4,7 +4,7 @@ export default function UserMuteRemoteVideo(
4
4
  state: ContentStateInterface,
5
5
  action: ActionType<'UserMuteRemoteVideo'>,
6
6
  ) {
7
- let stateUpdate: ContentStateInterface = {
7
+ let stateUpdate: Partial<ContentStateInterface> = {
8
8
  defaultContent: {
9
9
  ...state.defaultContent,
10
10
  [action.value[0]]: {
@@ -15,7 +15,7 @@ export default function UserOffline(
15
15
  const updatedActiveUids = [...state.activeUids].filter(
16
16
  (uid) => uid !== action.value[0],
17
17
  );
18
- const stateUpdate: ContentStateInterface = {
18
+ const stateUpdate: Partial<ContentStateInterface> = {
19
19
  defaultContent: state.defaultContent,
20
20
  activeUids: updatedActiveUids,
21
21
  };
@@ -217,13 +217,19 @@ const Create = ({
217
217
  geoFencing === true &&
218
218
  (Platform.OS === 'android' || Platform.OS === 'ios')
219
219
  ) {
220
- engine.current = await RtcEngine.createWithAreaCode(
221
- rtcProps.appId,
222
- // eslint-disable-next-line no-bitwise
223
- AreaCode.GLOB ^ AreaCode.CN,
224
- );
220
+ if (rtcProps?.appId) {
221
+ //@ts-ignore
222
+ engine.current = await RtcEngine.createWithAreaCode(
223
+ rtcProps?.appId,
224
+ // eslint-disable-next-line no-bitwise
225
+ //@ts-ignore
226
+ AreaCode.GLOB ^ AreaCode.CN,
227
+ );
228
+ }
225
229
  } else {
226
- engine.current = await RtcEngine.create(rtcProps.appId);
230
+ if (rtcProps?.appId) {
231
+ engine.current = await RtcEngine.create(rtcProps.appId);
232
+ }
227
233
  }
228
234
  /* Live Streaming */
229
235
  if (mode == ChannelProfile.LiveBroadcasting) {
@@ -242,24 +248,28 @@ const Create = ({
242
248
  await engine.current.enableAudioVolumeIndication(100, 3, true);
243
249
  }
244
250
  if (!audioRoom) {
245
- if (rtcProps.profile) {
251
+ if (rtcProps && rtcProps.profile) {
246
252
  if (Platform.OS === 'web') {
247
253
  // move this to bridge?
248
254
  // @ts-ignore
249
255
  await engine.current.setVideoProfile(rtcProps.profile);
250
256
  } else {
251
- const config: VideoEncoderConfiguration =
252
- quality[rtcProps.profile];
253
- await engine.current.setVideoEncoderConfiguration({
254
- ...config,
255
- bitrate: 0,
256
- });
257
+ if (rtcProps && rtcProps?.profile) {
258
+ const config: VideoEncoderConfiguration =
259
+ quality[rtcProps.profile];
260
+ //@ts-ignore
261
+ await engine.current.setVideoEncoderConfiguration({
262
+ ...config,
263
+ bitrate: 0,
264
+ });
265
+ }
257
266
  }
258
267
  }
259
268
  } else {
260
269
  //web will work even without audio profile
261
270
  //but native need to set audio profile otherwise user will experience low audio issue
262
271
  if (Platform.OS === 'android' || Platform.OS === 'ios') {
272
+ //@ts-ignore
263
273
  await engine.current.setAudioProfile(
264
274
  AudioProfile.Default,
265
275
  AudioScenario.Default,
@@ -269,6 +279,7 @@ const Create = ({
269
279
  //ref - https://docs.agora.io/en/help/integration-issues/profile_difference/#audio-route
270
280
  //so setting into phone speaker manually as requested
271
281
  if (mode == ChannelProfile.Communication) {
282
+ //@ts-ignore
272
283
  await engine.current.setEnableSpeakerphone(true);
273
284
  }
274
285
  }
@@ -299,8 +310,8 @@ const Create = ({
299
310
  'JoinChannelSuccess',
300
311
  async (channel, uid, elapsed) => {
301
312
  //Invoke the callback
302
- console.log('UIkit enabling dual stream', rtcProps.dual);
303
- if (rtcProps.dual) {
313
+ console.log('UIkit enabling dual stream', rtcProps?.dual);
314
+ if (rtcProps?.dual) {
304
315
  console.log('UIkit enabled dual stream');
305
316
  await engine.current!.enableDualStreamMode(rtcProps.dual);
306
317
  // await engine.current.setRemoteSubscribeFallbackOption(1);
@@ -312,12 +323,14 @@ const Create = ({
312
323
 
313
324
  engine.current.addListener('UserJoined', async (...args) => {
314
325
  // preventing STT pusher bot in renderlist
326
+ //@ts-ignore
315
327
  if (args[0] === 111111) {
316
328
  return;
317
329
  }
318
330
  //Get current peer IDs
319
331
  dispatch({
320
332
  type: 'UserJoined',
333
+ //@ts-ignore
321
334
  value: args,
322
335
  });
323
336
  });
@@ -326,6 +339,7 @@ const Create = ({
326
339
  //If user leaves
327
340
  dispatch({
328
341
  type: 'UserOffline',
342
+ //@ts-ignore
329
343
  value: args,
330
344
  });
331
345
  });
@@ -333,6 +347,7 @@ const Create = ({
333
347
  engine.current.addListener('RemoteAudioStateChanged', (...args) => {
334
348
  dispatch({
335
349
  type: 'RemoteAudioStateChanged',
350
+ //@ts-ignore
336
351
  value: args,
337
352
  });
338
353
  });
@@ -344,6 +359,7 @@ const Create = ({
344
359
  engine.current.addListener('RemoteVideoStateChanged', (...args) => {
345
360
  dispatch({
346
361
  type: 'RemoteVideoStateChanged',
362
+ //@ts-ignore
347
363
  value: args,
348
364
  });
349
365
  });
@@ -48,6 +48,7 @@ const Join: React.FC<{
48
48
  rtcProps.encryption.key &&
49
49
  rtcProps.encryption.mode
50
50
  ) {
51
+ console.log('using channel encryption', rtcProps.encryption);
51
52
  await engine.enableEncryption(true, {
52
53
  encryptionKey: rtcProps.encryption.key,
53
54
  encryptionMode: rtcProps.encryption.mode,
@@ -108,6 +109,7 @@ const Join: React.FC<{
108
109
  await leave();
109
110
  await join();
110
111
  }
112
+ console.log('Attempted join: ', rtcProps.channel);
111
113
  } else {
112
114
  console.log('In precall - waiting to join');
113
115
  }