agora-appbuilder-core 4.0.0-api.5 → 4.0.0-api.6
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/package.json +2 -2
- package/template/.bundle/config +2 -0
- package/template/Gemfile +4 -0
- package/template/Gulpfile.js +29 -29
- package/template/_eslintrc.js +3 -3
- package/template/_gitignore +12 -11
- package/template/_package-lock.json +26471 -22749
- package/template/_prettierrc.js +2 -2
- package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +30 -10
- package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +19 -0
- package/template/agora-rn-uikit/src/Controls/BtnTemplate.tsx +1 -0
- package/template/agora-rn-uikit/src/Controls/Icons.ts +45 -0
- package/template/agora-rn-uikit/src/Controls/Local/EndCall.tsx +6 -4
- package/template/agora-rn-uikit/src/Controls/Local/FullScreen.tsx +3 -1
- package/template/agora-rn-uikit/src/Controls/Local/LocalAudioMute.tsx +1 -0
- package/template/agora-rn-uikit/src/Controls/Local/LocalVideoMute.tsx +1 -0
- package/template/agora-rn-uikit/src/Controls/Local/SwitchCamera.tsx +1 -0
- package/template/agora-rn-uikit/src/Controls/Remote/RemoteAudioMute.tsx +1 -0
- package/template/agora-rn-uikit/src/Controls/Remote/RemoteSwap.tsx +3 -1
- package/template/agora-rn-uikit/src/Controls/Remote/RemoteVideoMute.tsx +1 -0
- package/template/agora-rn-uikit/src/Reducer/ActiveSpeaker.ts +30 -0
- package/template/agora-rn-uikit/src/Reducer/LocalMuteAudio.ts +3 -1
- package/template/agora-rn-uikit/src/Reducer/LocalMuteVideo.ts +3 -1
- package/template/agora-rn-uikit/src/Reducer/LocalPermissionState.ts +1 -1
- package/template/agora-rn-uikit/src/Reducer/RemoteAudioStateChanged.ts +3 -3
- package/template/agora-rn-uikit/src/Reducer/RemoteVideoStateChanged.ts +5 -4
- package/template/agora-rn-uikit/src/Reducer/UpdateDualStreamMode.ts +1 -1
- package/template/agora-rn-uikit/src/Reducer/UserJoined.ts +8 -5
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteAudio.ts +1 -1
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteVideo.ts +1 -1
- package/template/agora-rn-uikit/src/Reducer/UserOffline.ts +1 -1
- package/template/agora-rn-uikit/src/Reducer/UserPin.ts +18 -1
- package/template/agora-rn-uikit/src/Reducer/UserSecondaryPin.ts +23 -0
- package/template/agora-rn-uikit/src/Reducer/index.ts +2 -0
- package/template/agora-rn-uikit/src/Rtc/Create.tsx +47 -21
- package/template/agora-rn-uikit/src/Rtc/Join.tsx +37 -15
- package/template/agora-rn-uikit/src/RtcConfigure.tsx +122 -12
- package/template/agora-rn-uikit/src/Views/MaxVideoView.native.tsx +32 -4
- package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +21 -2
- package/template/agora-rn-uikit/src/Views/MinVideoView.tsx +2 -0
- package/template/android/app/build.gradle +59 -156
- package/template/android/app/src/debug/AndroidManifest.xml +6 -1
- package/template/android/app/src/debug/java/com/helloworld/ReactNativeFlipper.java +7 -4
- package/template/android/app/src/main/AndroidManifest.xml +6 -19
- package/template/android/app/src/main/assets/fonts/icomoon.ttf +0 -0
- package/template/android/app/src/main/java/com/helloworld/MainActivity.java +17 -0
- package/template/android/app/src/main/java/com/helloworld/MainApplication.java +19 -36
- package/template/android/app/src/release/java/com/helloworld/ReactNativeFlipper.java +20 -0
- package/template/android/build.gradle +19 -33
- package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/template/android/gradle/wrapper/gradle-wrapper.properties +3 -2
- package/template/android/gradle.properties +18 -4
- package/template/android/gradlew +165 -104
- package/template/android/gradlew.bat +12 -23
- package/template/android/settings.gradle +1 -0
- package/template/bridge/rtc/webNg/RtcEngine.ts +131 -16
- package/template/bridge/rtc/webNg/index.ts +72 -1
- package/template/bridge/rtm/web/index.ts +5 -3
- package/template/configTransform.js +16 -1
- package/template/customization-api/action-library.ts +0 -8
- package/template/customization-api/app-state.ts +11 -2
- package/template/customization-api/customEvents.ts +6 -1
- package/template/customization-api/index.ts +4 -0
- package/template/customization-api/sub-components.ts +6 -3
- package/template/customization-api/temp.ts +50 -0
- package/template/customization-api/typeDefinition.ts +26 -14
- package/template/customization-api/types.ts +26 -0
- package/template/customization-api/utils.ts +2 -0
- package/template/customization-implementation/index.ts +0 -1
- package/template/defaultConfig.js +72 -0
- package/template/global.d.ts +13 -1
- package/template/index.js +0 -4
- package/template/index.web.js +0 -5
- package/template/index.wsdk.tsx +1 -19
- package/template/ios/.xcode.env +11 -0
- package/template/ios/HelloWorld/AppDelegate.h +2 -4
- package/template/ios/HelloWorld/AppDelegate.mm +42 -0
- package/template/ios/HelloWorld/Info.plist +1 -1
- package/template/ios/HelloWorld/main.m +2 -1
- package/template/ios/HelloWorld.xcodeproj/project.pbxproj +529 -17
- package/template/ios/HelloWorld.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/template/ios/HelloWorld.xcworkspace/contents.xcworkspacedata +10 -0
- package/template/ios/HelloWorld.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/template/ios/HelloWorldTests/HelloWorldTests.m +14 -13
- package/template/ios/HelloWorldTests/Info.plist +2 -2
- package/template/ios/Podfile +53 -20
- package/template/ios/Podfile.lock +873 -0
- package/template/ios/ScreenSharing/Info.plist +15 -0
- package/template/ios/ScreenSharing/SampleHandler.h +9 -0
- package/template/ios/ScreenSharing/SampleHandler.m +70 -0
- package/template/jest.config.js +4 -0
- package/template/metro.config.js +7 -32
- package/template/package.json +52 -39
- package/template/react-native-toast-message/index.d.ts +3 -1
- package/template/react-native-toast-message/index.js +1 -0
- package/template/react-native-toast-message/src/components/base/index.js +20 -32
- package/template/react-native-toast-message/src/components/base/styles.js +18 -21
- package/template/react-native-toast-message/src/components/checkbox.js +24 -19
- package/template/react-native-toast-message/src/index.js +3 -1
- package/template/react-native-toast-message/src/index.sdk.tsx +4 -1
- package/template/src/App.tsx +13 -85
- package/template/src/AppRoutes.tsx +77 -0
- package/template/src/AppWrapper.tsx +38 -33
- package/template/src/SDKAppWrapper.tsx +79 -43
- package/template/src/app-state/useNoiseSupression.native.tsx +67 -0
- package/template/src/app-state/useNoiseSupression.tsx +107 -0
- package/template/src/app-state/useVideoQuality.tsx +39 -0
- package/template/src/assets/font-styles.css +171 -3
- package/template/src/assets/fonts/icomoon.ttf +0 -0
- package/template/src/assets/selection.json +1 -1
- package/template/src/atoms/ActionMenu.tsx +50 -11
- package/template/src/atoms/Avatar.tsx +51 -0
- package/template/src/atoms/Card.tsx +21 -8
- package/template/src/atoms/Carousel.native.tsx +105 -0
- package/template/src/atoms/Carousel.tsx +103 -0
- package/template/src/atoms/Checkbox.tsx +98 -0
- package/template/src/atoms/CircularProgress.tsx +0 -1
- package/template/src/atoms/ClipboardIconButton.tsx +91 -0
- package/template/src/atoms/CustomIcon.tsx +45 -0
- package/template/src/atoms/DropDownMulti.tsx +349 -0
- package/template/src/atoms/Dropdown.tsx +3 -3
- package/template/src/atoms/IconButton.tsx +52 -9
- package/template/src/atoms/ImageIcon.tsx +6 -3
- package/template/src/atoms/InlineNotification.tsx +81 -0
- package/template/src/atoms/MeetingLink.tsx +160 -0
- package/template/src/atoms/ParticipantsCount.tsx +18 -7
- package/template/src/atoms/Popup.tsx +49 -27
- package/template/src/atoms/PrimaryButton.tsx +19 -5
- package/template/src/atoms/RecordingInfo.tsx +2 -2
- package/template/src/atoms/SecondaryButton.tsx +2 -0
- package/template/src/atoms/Spacer.tsx +1 -0
- package/template/src/atoms/TertiaryButton.tsx +35 -5
- package/template/src/atoms/TextInput.tsx +2 -1
- package/template/src/atoms/Toolbar.tsx +64 -30
- package/template/src/atoms/ToolbarItem.tsx +11 -5
- package/template/src/atoms/ToolbarPreset.tsx +13 -2
- package/template/src/atoms/Tooltip.tsx +26 -4
- package/template/src/auth/AuthProvider.tsx +500 -0
- package/template/src/auth/AuthRoute.tsx +94 -0
- package/template/src/auth/IDPAuth.electron.tsx +31 -0
- package/template/src/auth/IDPAuth.tsx +67 -0
- package/template/src/auth/IDPLogoutComponent.tsx +158 -0
- package/template/src/auth/UserCancelPopup.tsx +115 -0
- package/template/src/auth/config.ts +52 -0
- package/template/src/auth/openIDPURL.electron.tsx +39 -0
- package/template/src/auth/openIDPURL.native.tsx +51 -0
- package/template/src/auth/openIDPURL.tsx +20 -0
- package/template/src/auth/useIDPAuth.electron.tsx +65 -0
- package/template/src/auth/useIDPAuth.native.tsx +70 -0
- package/template/src/auth/useIDPAuth.tsx +63 -0
- package/template/src/auth/useTokenAuth.tsx +194 -0
- package/template/src/components/Chat.tsx +5 -8
- package/template/src/components/ChatContext.ts +4 -0
- package/template/src/components/ColorConfigure.tsx +0 -1
- package/template/src/components/CommonStyles.ts +9 -2
- package/template/src/components/Controls.tsx +659 -52
- package/template/src/components/DeviceConfigure.tsx +362 -156
- package/template/src/components/DeviceContext.tsx +2 -0
- package/template/src/components/EventsConfigure.tsx +713 -109
- package/template/src/components/GraphQLProvider.tsx +62 -36
- package/template/src/components/GridVideo.tsx +23 -13
- package/template/src/components/HostControlView.tsx +11 -14
- package/template/src/components/JoinPhrase.tsx +0 -1
- package/template/src/components/Leftbar.tsx +4 -3
- package/template/src/components/Navbar.tsx +110 -42
- package/template/src/components/NavbarMobile.tsx +47 -36
- package/template/src/components/Navigation.native.tsx +1 -15
- package/template/src/{subComponents/screenshare/ScreenshareButton.native.tsx → components/Navigation.sdk.tsx} +17 -3
- package/template/src/components/Navigation.tsx +1 -15
- package/template/src/components/ParticipantsView.tsx +56 -48
- package/template/src/components/PinnedVideo.tsx +188 -114
- package/template/src/components/Precall.native.tsx +169 -67
- package/template/src/components/Precall.tsx +237 -71
- package/template/src/components/RTMConfigure.tsx +167 -55
- package/template/src/components/Rightbar.tsx +4 -3
- package/template/src/components/Router.electron.ts +1 -0
- package/template/src/components/Router.native.ts +1 -0
- package/template/src/components/Router.sdk.ts +1 -0
- package/template/src/components/Router.ts +1 -0
- package/template/src/components/SdkApiContext.tsx +179 -27
- package/template/src/components/SdkMuteToggleListener.tsx +88 -0
- package/template/src/components/SessionContext.tsx +0 -1
- package/template/src/components/Settings.tsx +25 -3
- package/template/src/components/SettingsView.tsx +44 -9
- package/template/src/components/Share.tsx +149 -71
- package/template/src/components/StorageContext.tsx +19 -5
- package/template/src/components/ToastComponent.tsx +3 -0
- package/template/src/components/WhiteboardLayout.tsx +291 -0
- package/template/src/components/chat-messages/useChatMessages.tsx +420 -207
- package/template/src/components/common/Error.tsx +2 -0
- package/template/src/components/common/Logo.tsx +2 -2
- package/template/src/components/contexts/LiveStreamDataContext.tsx +5 -4
- package/template/src/components/contexts/ScreenShareContext.tsx +15 -1
- package/template/src/components/contexts/WaitingRoomContext.tsx +50 -0
- package/template/src/components/contexts/WhiteboardContext.tsx +54 -54
- package/template/src/components/disable-chat/useDisableChat.tsx +32 -0
- package/template/src/components/livestream/LiveStreamContext.tsx +262 -177
- package/template/src/components/livestream/Types.ts +34 -18
- package/template/src/components/livestream/views/LiveStreamAttendeeLandingTile.tsx +295 -0
- package/template/src/components/livestream/views/LiveStreamControls.tsx +2 -4
- package/template/src/components/meeting-info-invite/MeetingInfo.tsx +82 -0
- package/template/src/components/meeting-info-invite/MeetingInfoCardHeader.tsx +86 -0
- package/template/src/components/meeting-info-invite/MeetingInfoGridTile.tsx +218 -0
- package/template/src/components/meeting-info-invite/MeetingInfoLinks.tsx +122 -0
- package/template/src/components/participants/AllAudienceParticipants.tsx +4 -5
- package/template/src/components/participants/AllHostParticipants.tsx +5 -6
- package/template/src/components/participants/Participant.tsx +40 -9
- package/template/src/components/participants/ParticipantSectionTitle.tsx +5 -2
- package/template/src/components/participants/ScreenshareParticipants.tsx +15 -17
- package/template/src/components/participants/UserActionMenuOptions.tsx +157 -49
- package/template/src/components/participants/WaitingRoomParticipants.tsx +74 -0
- package/template/src/components/popups/InvitePopup.tsx +110 -45
- package/template/src/components/popups/StartScreenSharePopup.native.tsx +182 -0
- package/template/src/components/popups/StartScreenSharePopup.tsx +6 -0
- package/template/src/components/popups/StopRecordingPopup.tsx +11 -5
- package/template/src/components/popups/StopScreenSharePopup.native.tsx +135 -0
- package/template/src/components/popups/StopScreenSharePopup.tsx +6 -0
- package/template/src/components/popups/WhiteboardClearAllPopup.tsx +123 -0
- package/template/src/components/precall/LocalMute.tsx +69 -45
- package/template/src/components/precall/PermissionHelper.tsx +52 -24
- package/template/src/components/precall/PreCallSettings.tsx +1 -0
- package/template/src/components/precall/VideoFallback.tsx +173 -0
- package/template/src/components/precall/VideoPreview.native.tsx +16 -50
- package/template/src/components/precall/VideoPreview.tsx +27 -162
- package/template/src/components/precall/index.tsx +2 -0
- package/template/src/components/precall/joinCallBtn.native.tsx +10 -3
- package/template/src/components/precall/joinCallBtn.tsx +11 -2
- package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +210 -0
- package/template/src/components/precall/joinWaitingRoomBtn.tsx +250 -0
- package/template/src/components/precall/meetingTitle.tsx +35 -9
- package/template/src/components/precall/selectDevice.tsx +5 -5
- package/template/src/components/precall/textInput.tsx +16 -18
- package/template/src/components/precall/usePreCall.tsx +14 -4
- package/template/src/components/room-info/useRoomInfo.tsx +34 -0
- package/template/src/components/useShareLink.tsx +24 -59
- package/template/src/components/useUserPreference.tsx +73 -10
- package/template/src/components/useVideoCall.tsx +76 -3
- package/template/src/components/virtual-background/VBButton.tsx +64 -0
- package/template/src/components/virtual-background/VBCard.native.tsx +282 -0
- package/template/src/components/virtual-background/VBCard.tsx +272 -0
- package/template/src/components/virtual-background/VBPanel.tsx +279 -0
- package/template/src/components/virtual-background/VButils.native.ts +37 -0
- package/template/src/components/virtual-background/VButils.ts +104 -0
- package/template/src/components/virtual-background/VideoPreview.native.tsx +43 -0
- package/template/src/components/virtual-background/VideoPreview.tsx +106 -0
- package/template/src/components/virtual-background/imagePaths.ts +87 -0
- package/template/src/components/virtual-background/images/beachImageBase64.ts +1 -0
- package/template/src/components/virtual-background/images/bedroomImageBase64.ts +1 -0
- package/template/src/components/virtual-background/images/bookImageBase64.ts +1 -0
- package/template/src/components/virtual-background/images/earthImageBase64.ts +1 -0
- package/template/src/components/virtual-background/images/index.ts +37 -0
- package/template/src/components/virtual-background/images/lampImageBase64.ts +1 -0
- package/template/src/components/virtual-background/images/mountainsImageBase64.ts +1 -0
- package/template/src/components/virtual-background/images/office1ImageBase64.ts +1 -0
- package/template/src/components/virtual-background/images/officeImageBase64.ts +1 -0
- package/template/src/components/virtual-background/images/plantsImageBase64.ts +1 -0
- package/template/src/components/virtual-background/images/skyImageBase64.ts +1 -0
- package/template/src/components/virtual-background/images/wallImageBase64.ts +1 -0
- package/template/src/components/virtual-background/useVB.native.tsx +188 -0
- package/template/src/components/virtual-background/useVB.tsx +267 -0
- package/template/src/components/whiteboard/StrokeWidthTool.tsx +137 -0
- package/template/src/components/whiteboard/WhiteboardButton.tsx +93 -0
- package/template/src/components/whiteboard/WhiteboardCanvas.tsx +99 -0
- package/template/src/components/whiteboard/WhiteboardConfigure.native.tsx +137 -0
- package/template/src/components/whiteboard/WhiteboardConfigure.tsx +441 -0
- package/template/src/components/whiteboard/WhiteboardCursor.tsx +152 -0
- package/template/src/components/whiteboard/WhiteboardToolBox.tsx +1246 -0
- package/template/src/components/whiteboard/WhiteboardView.native.tsx +109 -0
- package/template/src/components/whiteboard/WhiteboardView.tsx +81 -0
- package/template/src/components/whiteboard/WhiteboardWidget.tsx +674 -0
- package/template/src/components/whiteboard/WhiteboardWrapper.tsx +38 -0
- package/template/src/language/default-labels/commonLabels.ts +51 -14
- package/template/src/language/default-labels/createScreenLabels.ts +97 -17
- package/template/src/language/default-labels/joinScreenLabels.ts +45 -6
- package/template/src/language/default-labels/precallScreenLabels.ts +145 -23
- package/template/src/language/default-labels/shareLinkScreenLabels.ts +85 -37
- package/template/src/language/default-labels/videoCallScreenLabels.ts +1137 -158
- package/template/src/pages/Create.tsx +125 -80
- package/template/src/pages/Join.tsx +76 -34
- package/template/src/pages/Login.tsx +26 -0
- package/template/src/pages/VideoCall.tsx +229 -114
- package/template/src/pages/video-call/ActionSheet.native.tsx +54 -7
- package/template/src/pages/video-call/ActionSheet.tsx +55 -16
- package/template/src/pages/video-call/ActionSheetContent.tsx +366 -291
- package/template/src/pages/video-call/ActionSheetHandle.tsx +7 -1
- package/template/src/pages/video-call/DefaultLayouts.ts +11 -5
- package/template/src/pages/video-call/NameWithMicIcon.tsx +17 -9
- package/template/src/pages/video-call/PinchableView.tsx +119 -0
- package/template/src/pages/video-call/RenderComponent.tsx +12 -3
- package/template/src/pages/video-call/SidePanelHeader.tsx +208 -6
- package/template/src/pages/video-call/VideoCallMobileView.tsx +140 -106
- package/template/src/pages/video-call/VideoCallScreen.native.tsx +3 -2
- package/template/src/pages/video-call/VideoCallScreen.tsx +113 -66
- package/template/src/pages/video-call/VideoComponent.tsx +53 -5
- package/template/src/pages/video-call/VideoRenderer.tsx +309 -52
- package/template/src/pages/video-call/VisibilitySensor.tsx +104 -0
- package/template/src/pages/video-call/ZoomableWrapper.native.tsx +34 -0
- package/template/src/pages/video-call/ZoomableWrapper.tsx +5 -0
- package/template/src/pages/video-call/index.ts +2 -0
- package/template/src/rtm/RTMEngine.ts +9 -4
- package/template/src/rtm-events/constants.ts +20 -0
- package/template/src/rtm-events-api/Events.ts +2 -0
- package/template/src/rtm-events-api/LocalEvents.ts +8 -0
- package/template/src/selection.json +1 -0
- package/template/src/subComponents/ChatBubble.tsx +81 -64
- package/template/src/subComponents/ChatContainer.tsx +20 -13
- package/template/src/subComponents/ChatInput.ios.tsx +11 -2
- package/template/src/subComponents/ChatInput.tsx +12 -3
- package/template/src/subComponents/Checkbox.native.tsx +46 -46
- package/template/src/subComponents/Checkbox.tsx +7 -6
- package/template/src/subComponents/CopyJoinInfo.tsx +26 -11
- package/template/src/subComponents/EndcallPopup.tsx +83 -12
- package/template/src/subComponents/LanguageSelector.tsx +34 -30
- package/template/src/subComponents/LayoutIconButton.tsx +30 -8
- package/template/src/subComponents/LayoutIconDropdown.tsx +19 -3
- package/template/src/subComponents/Loading.tsx +60 -0
- package/template/src/subComponents/LocalAudioMute.tsx +106 -30
- package/template/src/subComponents/LocalEndCall.tsx +91 -15
- package/template/src/subComponents/LocalSwitchCamera.tsx +50 -11
- package/template/src/subComponents/LocalVideoMute.tsx +126 -32
- package/template/src/subComponents/LogoutButton.tsx +1 -1
- package/template/src/subComponents/NetworkQualityPill.tsx +14 -31
- package/template/src/subComponents/Recording.tsx +23 -6
- package/template/src/subComponents/RemoteAudioMute.tsx +3 -3
- package/template/src/subComponents/RemoteMutePopup.tsx +55 -14
- package/template/src/subComponents/RemoteVideoMute.tsx +3 -3
- package/template/src/subComponents/RemoveMeetingPopup.tsx +19 -6
- package/template/src/subComponents/RemoveScreensharePopup.tsx +20 -5
- package/template/src/subComponents/ScreenShareNotice.tsx +11 -6
- package/template/src/subComponents/SelectDevice.tsx +98 -32
- package/template/src/subComponents/SidePanelEnum.tsx +2 -0
- package/template/src/subComponents/SidePanelHeader.tsx +97 -63
- package/template/src/subComponents/ToastConfig.tsx +70 -61
- package/template/src/subComponents/caption/Caption.tsx +130 -0
- package/template/src/subComponents/caption/CaptionContainer.tsx +302 -0
- package/template/src/subComponents/caption/CaptionIcon.tsx +111 -0
- package/template/src/subComponents/caption/CaptionText.tsx +182 -0
- package/template/src/subComponents/caption/DownloadTranscriptBtn.tsx +65 -0
- package/template/src/subComponents/caption/LanguageSelectorPopup.tsx +192 -0
- package/template/src/subComponents/caption/Transcript.tsx +449 -0
- package/template/src/subComponents/caption/TranscriptIcon.tsx +123 -0
- package/template/src/subComponents/caption/TranscriptText.tsx +98 -0
- package/template/src/subComponents/caption/index.ts +3 -0
- package/template/src/subComponents/caption/proto/ptoto.js +91 -0
- package/template/src/subComponents/caption/proto/test.proto +23 -0
- package/template/src/subComponents/caption/useCaption.tsx +123 -0
- package/template/src/subComponents/caption/useCaptionWidth.ts +27 -0
- package/template/src/subComponents/caption/useSTTAPI.tsx +179 -0
- package/template/src/subComponents/caption/useStreamMessageUtils.native.ts +211 -0
- package/template/src/subComponents/caption/useStreamMessageUtils.ts +235 -0
- package/template/src/subComponents/caption/useTranscriptDownload.native.ts +68 -0
- package/template/src/subComponents/caption/useTranscriptDownload.ts +52 -0
- package/template/src/subComponents/caption/utils.ts +125 -0
- package/template/src/subComponents/chat/ChatParticipants.tsx +53 -17
- package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +11 -13
- package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +33 -9
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamApprovedRequestRecall.tsx +1 -0
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestApprove.tsx +10 -6
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestReject.tsx +28 -19
- package/template/src/subComponents/recording/useRecording.tsx +49 -20
- package/template/src/subComponents/recording/useRecordingLayoutQuery.tsx +0 -1
- package/template/src/subComponents/screenshare/ScreenshareButton.tsx +29 -10
- package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +270 -66
- package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +182 -95
- package/template/src/subComponents/screenshare/useScreenshare.tsx +2 -0
- package/template/src/subComponents/waiting-rooms/WaitingRoomControls.tsx +85 -0
- package/template/src/subComponents/waiting-rooms/useWaitingRoomAPI.ts +75 -0
- package/template/src/theme/index.ts +9 -0
- package/template/src/utils/SdkEvents.ts +14 -0
- package/template/src/utils/SdkMethodEvents.ts +23 -3
- package/template/src/utils/axiomLogger.ts +117 -0
- package/template/src/utils/book.jpg +0 -0
- package/template/src/utils/common.tsx +118 -6
- package/template/src/utils/endCallEveryOne.ts +7 -0
- package/template/src/utils/getCustomRoute.ts +7 -0
- package/template/src/utils/index.tsx +23 -0
- package/template/src/utils/useActionSheet.tsx +50 -0
- package/template/src/utils/useActiveSpeaker.ts +3 -7
- package/template/src/utils/useAppState.ts +17 -0
- package/template/src/utils/useAsyncEffect.ts +138 -0
- package/template/src/utils/useCreateRoom.ts +8 -12
- package/template/src/utils/useDisableButton.tsx +37 -0
- package/template/src/utils/useFindActiveSpeaker.native.ts +4 -0
- package/template/src/utils/useFindActiveSpeaker.ts +335 -0
- package/template/src/utils/useIsLocalUserSpeaking.native.ts +4 -0
- package/template/src/utils/useIsLocalUserSpeaking.ts +98 -0
- package/template/src/utils/useJoinRoom.ts +97 -36
- package/template/src/utils/useMuteToggleLocal.ts +114 -96
- package/template/src/utils/useString.ts +13 -3
- package/template/static.d.ts +42 -0
- package/template/tsconfig_rsdk_index.json +3 -3
- package/template/tsconfig_wsdk_index.json +1 -1
- package/template/web/index.html +20 -0
- package/template/webpack.commons.js +21 -10
- package/template/webpack.web.config.js +7 -3
- package/template/_buckconfig +0 -6
- package/template/_gitattributes +0 -1
- package/template/android/app/_BUCK +0 -55
- package/template/android/app/build_defs.bzl +0 -19
- package/template/ios/HelloWorld/AppDelegate.m +0 -74
- package/template/src/components/OAuth.electron.tsx +0 -41
- package/template/src/components/OAuth.native.tsx +0 -55
- package/template/src/components/OAuth.tsx +0 -30
- package/template/src/components/OAuthConfig.ts +0 -77
- package/template/src/components/Settings.native.tsx +0 -21
- package/template/src/components/StoreToken.tsx +0 -39
|
@@ -25,6 +25,7 @@ import AgoraRTC, {
|
|
|
25
25
|
ClientRoleOptions,
|
|
26
26
|
CameraVideoTrackInitConfig,
|
|
27
27
|
MicrophoneAudioTrackInitConfig,
|
|
28
|
+
IMicrophoneAudioTrack,
|
|
28
29
|
} from 'agora-rtc-sdk-ng';
|
|
29
30
|
import type {
|
|
30
31
|
RtcEngineEvents,
|
|
@@ -137,6 +138,19 @@ export enum RnEncryptionEnum {
|
|
|
137
138
|
* @since v3.3.1
|
|
138
139
|
*/
|
|
139
140
|
AES256GCM = 6,
|
|
141
|
+
/**
|
|
142
|
+
* 7: 128-bit GCM encryption, GCM mode.
|
|
143
|
+
*
|
|
144
|
+
* @since v3.4.5
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
AES128GCM2 = 7,
|
|
148
|
+
/**
|
|
149
|
+
* 8: 256-bit AES encryption, GCM mode.
|
|
150
|
+
*
|
|
151
|
+
* @since v3.4.5
|
|
152
|
+
*/
|
|
153
|
+
AES256GCM2 = 8,
|
|
140
154
|
}
|
|
141
155
|
|
|
142
156
|
export enum VideoStreamType {
|
|
@@ -185,6 +199,7 @@ export default class RtcEngine {
|
|
|
185
199
|
['RemoteVideoStateChanged', () => null],
|
|
186
200
|
['NetworkQuality', () => null],
|
|
187
201
|
['ActiveSpeaker', () => null],
|
|
202
|
+
['StreamMessage', () => null],
|
|
188
203
|
]);
|
|
189
204
|
public localStream: LocalStream = {};
|
|
190
205
|
public screenStream: ScreenStream = {};
|
|
@@ -202,6 +217,7 @@ export default class RtcEngine {
|
|
|
202
217
|
private muteLocalVideoMutex = false;
|
|
203
218
|
private muteLocalAudioMutex = false;
|
|
204
219
|
private speakerDeviceId = '';
|
|
220
|
+
private usersVolumeLevel = [];
|
|
205
221
|
// Create channel profile and set it here
|
|
206
222
|
|
|
207
223
|
// Create channel profile and set it here
|
|
@@ -217,8 +233,19 @@ export default class RtcEngine {
|
|
|
217
233
|
return engine;
|
|
218
234
|
}
|
|
219
235
|
|
|
236
|
+
getRemoteVideoStats(id: string) {
|
|
237
|
+
try {
|
|
238
|
+
const data = this.client.getRemoteVideoStats();
|
|
239
|
+
return data && data[id] ? data[id] : null;
|
|
240
|
+
} catch (error) {
|
|
241
|
+
console.log(`ERROR: on getRemoteVideoStats - ` + error?.message);
|
|
242
|
+
return null;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
220
246
|
async setVideoProfile(profile: VideoProfile): Promise<void> {
|
|
221
247
|
this.videoProfile = profile;
|
|
248
|
+
this.localStream?.video?.setEncoderConfiguration(profile);
|
|
222
249
|
}
|
|
223
250
|
|
|
224
251
|
async enableAudio(): Promise<void> {
|
|
@@ -240,7 +267,10 @@ export default class RtcEngine {
|
|
|
240
267
|
}
|
|
241
268
|
}
|
|
242
269
|
|
|
243
|
-
async enableVideo(
|
|
270
|
+
async enableVideo(
|
|
271
|
+
preferredCameraId?: string,
|
|
272
|
+
preferredMicrophoneId?: string,
|
|
273
|
+
): Promise<void> {
|
|
244
274
|
/**
|
|
245
275
|
* Issue: Backgrounding the browser or app causes the audio streaming to be cut off.
|
|
246
276
|
* Impact: All browsers and apps that use WKWebView on iOS 15.x, such as Safari and Chrome.
|
|
@@ -252,14 +282,16 @@ export default class RtcEngine {
|
|
|
252
282
|
|
|
253
283
|
const audioConfig: MicrophoneAudioTrackInitConfig = {
|
|
254
284
|
bypassWebAudio: Platform.OS == 'web' && isMobileOrTablet(),
|
|
255
|
-
|
|
285
|
+
microphoneId: preferredMicrophoneId,
|
|
256
286
|
};
|
|
257
287
|
const videoConfig: CameraVideoTrackInitConfig = {
|
|
258
288
|
encoderConfig: this.videoProfile,
|
|
259
|
-
|
|
289
|
+
cameraId: preferredCameraId,
|
|
260
290
|
};
|
|
261
291
|
try {
|
|
262
292
|
let [localAudio, localVideo] =
|
|
293
|
+
// If preferred devices are not present, the createTrack call will fallover to
|
|
294
|
+
// the catch block below.
|
|
263
295
|
await AgoraRTC.createMicrophoneAndCameraTracks(
|
|
264
296
|
audioConfig,
|
|
265
297
|
videoConfig,
|
|
@@ -277,9 +309,15 @@ export default class RtcEngine {
|
|
|
277
309
|
} catch (e) {
|
|
278
310
|
let audioError = false;
|
|
279
311
|
let videoError = false;
|
|
280
|
-
try {
|
|
281
|
-
let localAudio = await AgoraRTC.createMicrophoneAudioTrack(audioConfig);
|
|
282
312
|
|
|
313
|
+
try {
|
|
314
|
+
let localAudio: IMicrophoneAudioTrack;
|
|
315
|
+
try {
|
|
316
|
+
localAudio = await AgoraRTC.createMicrophoneAudioTrack(audioConfig);
|
|
317
|
+
} catch (e) {
|
|
318
|
+
videoConfig.microphoneId = '';
|
|
319
|
+
localAudio = await AgoraRTC.createMicrophoneAudioTrack(audioConfig);
|
|
320
|
+
}
|
|
283
321
|
this.localStream.audio = localAudio;
|
|
284
322
|
this.audioDeviceId = localAudio
|
|
285
323
|
?.getMediaStreamTrack()
|
|
@@ -288,8 +326,41 @@ export default class RtcEngine {
|
|
|
288
326
|
} catch (error) {
|
|
289
327
|
audioError = error;
|
|
290
328
|
}
|
|
329
|
+
|
|
291
330
|
try {
|
|
292
|
-
let localVideo
|
|
331
|
+
let localVideo: ICameraVideoTrack;
|
|
332
|
+
try {
|
|
333
|
+
localVideo = await AgoraRTC.createCameraVideoTrack(videoConfig);
|
|
334
|
+
} catch (e) {
|
|
335
|
+
videoConfig.cameraId = '';
|
|
336
|
+
try {
|
|
337
|
+
localVideo = await AgoraRTC.createCameraVideoTrack(videoConfig);
|
|
338
|
+
} catch (e) {
|
|
339
|
+
console.log(
|
|
340
|
+
'[RTCEngineBridge]: Provided cameraId and default camera failed, trying other available devices',
|
|
341
|
+
);
|
|
342
|
+
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
343
|
+
for (let device of devices) {
|
|
344
|
+
if (device.kind === 'videoinput') {
|
|
345
|
+
videoConfig.cameraId = device.deviceId;
|
|
346
|
+
try {
|
|
347
|
+
localVideo = await AgoraRTC.createCameraVideoTrack(
|
|
348
|
+
videoConfig,
|
|
349
|
+
);
|
|
350
|
+
break;
|
|
351
|
+
} catch (e) {
|
|
352
|
+
videoError = e;
|
|
353
|
+
console.log(
|
|
354
|
+
'[RTCEngineBridge]:',
|
|
355
|
+
'Camera not available with deviceId' + device,
|
|
356
|
+
'Reason: ',
|
|
357
|
+
e,
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
293
364
|
this.localStream.video = localVideo;
|
|
294
365
|
this.videoDeviceId = localVideo
|
|
295
366
|
?.getMediaStreamTrack()
|
|
@@ -298,6 +369,7 @@ export default class RtcEngine {
|
|
|
298
369
|
} catch (error) {
|
|
299
370
|
videoError = error;
|
|
300
371
|
}
|
|
372
|
+
|
|
301
373
|
e.status = {audioError, videoError};
|
|
302
374
|
throw e;
|
|
303
375
|
// if (audioError && videoError) throw e;
|
|
@@ -357,7 +429,7 @@ export default class RtcEngine {
|
|
|
357
429
|
optionalUid: number,
|
|
358
430
|
): Promise<void> {
|
|
359
431
|
// TODO create agora client here
|
|
360
|
-
this.client.on('user-joined',
|
|
432
|
+
this.client.on('user-joined', user => {
|
|
361
433
|
(this.eventsMap.get('UserJoined') as callbackType)(user.uid);
|
|
362
434
|
(this.eventsMap.get('RemoteVideoStateChanged') as callbackType)(
|
|
363
435
|
user.uid,
|
|
@@ -373,7 +445,7 @@ export default class RtcEngine {
|
|
|
373
445
|
);
|
|
374
446
|
});
|
|
375
447
|
|
|
376
|
-
this.client.on('user-left',
|
|
448
|
+
this.client.on('user-left', user => {
|
|
377
449
|
const uid = user.uid;
|
|
378
450
|
if (this.remoteStreams.has(uid)) {
|
|
379
451
|
this.remoteStreams.delete(uid);
|
|
@@ -452,7 +524,10 @@ export default class RtcEngine {
|
|
|
452
524
|
}
|
|
453
525
|
});
|
|
454
526
|
|
|
455
|
-
this.client.on('volume-indicator',
|
|
527
|
+
this.client.on('volume-indicator', volumes => {
|
|
528
|
+
this.usersVolumeLevel = volumes;
|
|
529
|
+
/**
|
|
530
|
+
* old active speaker logic
|
|
456
531
|
const highestvolumeObj = volumes.reduce(
|
|
457
532
|
(highestVolume, volume, index) => {
|
|
458
533
|
if (highestVolume === null) {
|
|
@@ -463,7 +538,7 @@ export default class RtcEngine {
|
|
|
463
538
|
}
|
|
464
539
|
return highestVolume;
|
|
465
540
|
}
|
|
466
|
-
//
|
|
541
|
+
//console.log(`${index} UID ${volume.uid} Level ${volume.level}`);
|
|
467
542
|
},
|
|
468
543
|
null,
|
|
469
544
|
);
|
|
@@ -480,6 +555,7 @@ export default class RtcEngine {
|
|
|
480
555
|
activeSpeakerCallBack(activeSpeakerUid);
|
|
481
556
|
this.activeSpeakerUid = activeSpeakerUid;
|
|
482
557
|
}
|
|
558
|
+
*/
|
|
483
559
|
});
|
|
484
560
|
|
|
485
561
|
// this.client.on('stream-fallback', (evt))
|
|
@@ -503,7 +579,7 @@ export default class RtcEngine {
|
|
|
503
579
|
const remoteUserNetworkQualities =
|
|
504
580
|
this.client.getRemoteNetworkQuality();
|
|
505
581
|
|
|
506
|
-
Object.keys(remoteUserNetworkQualities).forEach(
|
|
582
|
+
Object.keys(remoteUserNetworkQualities).forEach(uid => {
|
|
507
583
|
networkQualityIndicatorCallback(
|
|
508
584
|
uid,
|
|
509
585
|
remoteUserNetworkQualities[uid].downlinkNetworkQuality,
|
|
@@ -513,6 +589,14 @@ export default class RtcEngine {
|
|
|
513
589
|
},
|
|
514
590
|
);
|
|
515
591
|
|
|
592
|
+
/* Recieve Captions */
|
|
593
|
+
this.client.on('stream-message', (uid: UID, payload: UInt8Array) => {
|
|
594
|
+
console.log(
|
|
595
|
+
`stt-web: onStreamMessageCallback uid:${uid} , payload:${payload}`,
|
|
596
|
+
);
|
|
597
|
+
(this.eventsMap.get('StreamMessage') as callbackType)(uid, payload);
|
|
598
|
+
});
|
|
599
|
+
|
|
516
600
|
await this.client.join(
|
|
517
601
|
this.appId,
|
|
518
602
|
channelName,
|
|
@@ -525,6 +609,10 @@ export default class RtcEngine {
|
|
|
525
609
|
console.log('enabling screen sleep');
|
|
526
610
|
}
|
|
527
611
|
|
|
612
|
+
getUsersVolumeLevel() {
|
|
613
|
+
return this.usersVolumeLevel;
|
|
614
|
+
}
|
|
615
|
+
|
|
528
616
|
async leaveChannel(): Promise<void> {
|
|
529
617
|
this.client.leave();
|
|
530
618
|
this.remoteStreams.forEach((stream, uid, map) => {
|
|
@@ -547,10 +635,12 @@ export default class RtcEngine {
|
|
|
547
635
|
event === 'RemoteAudioStateChanged' ||
|
|
548
636
|
event === 'RemoteVideoStateChanged' ||
|
|
549
637
|
event === 'NetworkQuality' ||
|
|
550
|
-
event === 'ActiveSpeaker'
|
|
638
|
+
event === 'ActiveSpeaker' ||
|
|
639
|
+
event === 'StreamMessage'
|
|
551
640
|
) {
|
|
552
641
|
this.eventsMap.set(event, listener as callbackType);
|
|
553
642
|
}
|
|
643
|
+
|
|
554
644
|
return {
|
|
555
645
|
remove: () => {
|
|
556
646
|
console.log(
|
|
@@ -730,11 +820,11 @@ export default class RtcEngine {
|
|
|
730
820
|
|
|
731
821
|
async changeSpeaker(speakerId, callback, error) {
|
|
732
822
|
try {
|
|
733
|
-
this.speakerDeviceId = speakerId;
|
|
734
823
|
// setting sepeaker for all remote stream (previously joined users)
|
|
735
824
|
this.remoteStreams?.forEach((stream, uid, map) => {
|
|
736
825
|
stream?.audio?.setPlaybackDevice(speakerId);
|
|
737
826
|
});
|
|
827
|
+
this.speakerDeviceId = speakerId;
|
|
738
828
|
callback(speakerId);
|
|
739
829
|
} catch (e) {
|
|
740
830
|
error(e);
|
|
@@ -762,7 +852,7 @@ export default class RtcEngine {
|
|
|
762
852
|
|
|
763
853
|
// Bug in implementation !!!
|
|
764
854
|
async setRemoteSubscribeFallbackOption(option: 0 | 1 | 2) {
|
|
765
|
-
this.streams.forEach(
|
|
855
|
+
this.streams.forEach(stream => {
|
|
766
856
|
this.client.setStreamFallbackOption(stream, option);
|
|
767
857
|
});
|
|
768
858
|
Promise.resolve();
|
|
@@ -787,6 +877,17 @@ export default class RtcEngine {
|
|
|
787
877
|
break;
|
|
788
878
|
case RnEncryptionEnum.SM4128ECB:
|
|
789
879
|
mode = 'sm4-128-ecb';
|
|
880
|
+
break;
|
|
881
|
+
case RnEncryptionEnum.AES256GCM:
|
|
882
|
+
mode = 'aes-256-gcm';
|
|
883
|
+
break;
|
|
884
|
+
case RnEncryptionEnum.AES128GCM2:
|
|
885
|
+
mode = 'aes-128-gcm2';
|
|
886
|
+
break;
|
|
887
|
+
case RnEncryptionEnum.AES256GCM2:
|
|
888
|
+
mode = 'aes-256-gcm2';
|
|
889
|
+
break;
|
|
890
|
+
|
|
790
891
|
default:
|
|
791
892
|
mode = 'none';
|
|
792
893
|
}
|
|
@@ -801,14 +902,25 @@ export default class RtcEngine {
|
|
|
801
902
|
config: {
|
|
802
903
|
encryptionMode: RnEncryptionEnum;
|
|
803
904
|
encryptionKey: string;
|
|
905
|
+
encryptionKdfSalt: string;
|
|
804
906
|
},
|
|
805
907
|
): Promise<void> {
|
|
806
908
|
let mode: EncryptionMode;
|
|
807
909
|
mode = this.getEncryptionMode(enabled, config?.encryptionMode);
|
|
808
910
|
try {
|
|
809
911
|
await Promise.all([
|
|
810
|
-
this.client.setEncryptionConfig(
|
|
811
|
-
|
|
912
|
+
this.client.setEncryptionConfig(
|
|
913
|
+
mode,
|
|
914
|
+
config.encryptionKey,
|
|
915
|
+
config.encryptionKdfSalt,
|
|
916
|
+
true, // encryptDataStream
|
|
917
|
+
),
|
|
918
|
+
this.screenClient.setEncryptionConfig(
|
|
919
|
+
mode,
|
|
920
|
+
config.encryptionKey,
|
|
921
|
+
config.encryptionKdfSalt,
|
|
922
|
+
true, // encryptDataStream
|
|
923
|
+
),
|
|
812
924
|
]);
|
|
813
925
|
} catch (e) {
|
|
814
926
|
throw e;
|
|
@@ -892,6 +1004,7 @@ export default class RtcEngine {
|
|
|
892
1004
|
encryption: {
|
|
893
1005
|
screenKey: string;
|
|
894
1006
|
mode: RnEncryptionEnum;
|
|
1007
|
+
salt: string;
|
|
895
1008
|
},
|
|
896
1009
|
config: ScreenVideoTrackInitConfig = {},
|
|
897
1010
|
audio: 'enable' | 'disable' | 'auto' = 'auto',
|
|
@@ -912,6 +1025,8 @@ export default class RtcEngine {
|
|
|
912
1025
|
await this.screenClient.setEncryptionConfig(
|
|
913
1026
|
mode,
|
|
914
1027
|
encryption.screenKey,
|
|
1028
|
+
encryption.salt,
|
|
1029
|
+
true, // encryptDataStream
|
|
915
1030
|
);
|
|
916
1031
|
} catch (e) {
|
|
917
1032
|
console.log('e: Encryption for screenshare failed', e);
|
|
@@ -28,5 +28,76 @@ export const VideoRenderMode = {...Types.VideoRenderMode};
|
|
|
28
28
|
export const VideoMirrorMode = {...Types.VideoRenderMode};
|
|
29
29
|
|
|
30
30
|
export {RnEncryptionEnum as EncryptionMode} from './RtcEngine';
|
|
31
|
-
export {AREAS as AreaCode} from './RtcEngine'
|
|
31
|
+
export {AREAS as AreaCode} from './RtcEngine';
|
|
32
|
+
export type VideoEncoderConfiguration = any;
|
|
33
|
+
export declare enum AudioScenario {
|
|
34
|
+
/**
|
|
35
|
+
* 0: Default audio scenario.
|
|
36
|
+
*
|
|
37
|
+
* **Note**
|
|
38
|
+
* If you run the iOS app on an M1 Mac, due to the hardware differences between M1 Macs, iPhones, and iPads,
|
|
39
|
+
* the default audio scenario of the Agora iOS SDK is the same as that of the Agora macOS SDK.
|
|
40
|
+
*/
|
|
41
|
+
Default = 0,
|
|
42
|
+
/**
|
|
43
|
+
* 1: Entertainment scenario where users need to frequently switch the user role.
|
|
44
|
+
*/
|
|
45
|
+
ChatRoomEntertainment = 1,
|
|
46
|
+
/**
|
|
47
|
+
* 2: Education scenario where users want smoothness and stability.
|
|
48
|
+
*/
|
|
49
|
+
Education = 2,
|
|
50
|
+
/**
|
|
51
|
+
* 3: High-quality audio chatroom scenario where hosts mainly play music.
|
|
52
|
+
*/
|
|
53
|
+
GameStreaming = 3,
|
|
54
|
+
/**
|
|
55
|
+
* 4: Showroom scenario where a single host wants high-quality audio.
|
|
56
|
+
*/
|
|
57
|
+
ShowRoom = 4,
|
|
58
|
+
/**
|
|
59
|
+
* 5: Gaming scenario for group chat that only contains the human voice.
|
|
60
|
+
*/
|
|
61
|
+
ChatRoomGaming = 5,
|
|
62
|
+
/**
|
|
63
|
+
* IoT (Internet of Things) scenario where users use IoT devices with low power consumption.
|
|
64
|
+
*
|
|
65
|
+
* @since v3.2.0.
|
|
66
|
+
*/
|
|
67
|
+
IOT = 6,
|
|
68
|
+
/**
|
|
69
|
+
* Meeting scenario that mainly contains the human voice.
|
|
70
|
+
*
|
|
71
|
+
* @since v3.2.0.
|
|
72
|
+
*/
|
|
73
|
+
MEETING = 8,
|
|
74
|
+
}
|
|
75
|
+
export declare enum AudioProfile {
|
|
76
|
+
/**
|
|
77
|
+
* 0: Default audio profile.
|
|
78
|
+
* - In the `Communication` profile: A sample rate of 32 KHz, audio encoding, mono, and a bitrate of up to 18 Kbps.
|
|
79
|
+
* - In the `LiveBroadcasting` profile: A sample rate of 48 KHz, music encoding, mono, and a bitrate of up to 64 Kbps.
|
|
80
|
+
*/
|
|
81
|
+
Default = 0,
|
|
82
|
+
/**
|
|
83
|
+
* 1: A sample rate of 32 KHz, audio encoding, mono, and a bitrate of up to 18 Kbps.
|
|
84
|
+
*/
|
|
85
|
+
SpeechStandard = 1,
|
|
86
|
+
/**
|
|
87
|
+
* 2: A sample rate of 48 KHz, music encoding, mono, and a bitrate of up to 64 Kbps.
|
|
88
|
+
*/
|
|
89
|
+
MusicStandard = 2,
|
|
90
|
+
/**
|
|
91
|
+
* 3: A sample rate of 48 KHz, music encoding, stereo, and a bitrate of up to 80 Kbps.
|
|
92
|
+
*/
|
|
93
|
+
MusicStandardStereo = 3,
|
|
94
|
+
/**
|
|
95
|
+
* 4: A sample rate of 48 KHz, music encoding, mono, and a bitrate of up to 96 Kbps.
|
|
96
|
+
*/
|
|
97
|
+
MusicHighQuality = 4,
|
|
98
|
+
/**
|
|
99
|
+
* 5: A sample rate of 48 KHz, music encoding, stereo, and a bitrate of up to 128 Kbps.
|
|
100
|
+
*/
|
|
101
|
+
MusicHighQualityStereo = 5,
|
|
102
|
+
}
|
|
32
103
|
export default RtcEngine;
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
} from 'agora-react-native-rtm/lib/typescript/src';
|
|
19
19
|
import {RtmClientEvents} from 'agora-react-native-rtm/lib/typescript/src/RtmEngine';
|
|
20
20
|
import AgoraRTM, {VERSION} from 'agora-rtm-sdk';
|
|
21
|
+
import RtmClient from 'agora-react-native-rtm';
|
|
21
22
|
// export {RtmAttribute}
|
|
22
23
|
//
|
|
23
|
-
interface RtmAttributePlaceholder {
|
|
24
|
-
};
|
|
24
|
+
interface RtmAttributePlaceholder {}
|
|
25
25
|
export {RtmAttributePlaceholder as RtmAttribute};
|
|
26
26
|
|
|
27
27
|
type callbackType = (args?: any) => void;
|
|
@@ -99,6 +99,8 @@ export default class RtmEngine {
|
|
|
99
99
|
this.appId = APP_ID;
|
|
100
100
|
this.client = AgoraRTM.createInstance(this.appId);
|
|
101
101
|
|
|
102
|
+
window.rtmClient = this.client;
|
|
103
|
+
|
|
102
104
|
this.client.on('ConnectionStateChanged', (state, reason) => {
|
|
103
105
|
this.clientEventsMap.get('connectionStateChanged')({state, reason});
|
|
104
106
|
});
|
|
@@ -174,7 +176,7 @@ export default class RtmEngine {
|
|
|
174
176
|
}
|
|
175
177
|
|
|
176
178
|
async logout(): Promise<any> {
|
|
177
|
-
return this.client.logout();
|
|
179
|
+
return await this.client.logout();
|
|
178
180
|
}
|
|
179
181
|
|
|
180
182
|
async joinChannel(channelId: string): Promise<any> {
|
|
@@ -12,7 +12,22 @@
|
|
|
12
12
|
let jsonFile = require('./config.json');
|
|
13
13
|
let PREFIX = '$config';
|
|
14
14
|
let config = {};
|
|
15
|
-
Object.keys(jsonFile).map(
|
|
15
|
+
Object.keys(jsonFile).map(key => {
|
|
16
16
|
config[`${PREFIX}.${key}`] = jsonFile[key];
|
|
17
17
|
});
|
|
18
|
+
|
|
19
|
+
//find any missing config
|
|
20
|
+
const defaultConfig = require('./defaultConfig');
|
|
21
|
+
const filteredArray = Object.keys(defaultConfig).filter(
|
|
22
|
+
value => !Object.keys(jsonFile).includes(value),
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
//add missing config with default value
|
|
26
|
+
if (filteredArray && filteredArray?.length) {
|
|
27
|
+
//console.error('config.json missing ', filteredArray);
|
|
28
|
+
filteredArray.forEach(i => {
|
|
29
|
+
config[`${PREFIX}.${i}`] = defaultConfig[i];
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
18
33
|
module.exports = config;
|
|
@@ -8,11 +8,3 @@ export {default as useRemoteEndcall} from '../src/utils/useRemoteEndCall';
|
|
|
8
8
|
export {default as useSwitchCamera} from '../src/utils/useSwitchCamera';
|
|
9
9
|
|
|
10
10
|
export {controlMessageEnum} from '../src/components/ChatContext';
|
|
11
|
-
//audio/video toggle state
|
|
12
|
-
export {ToggleState} from '../agora-rn-uikit/src/Contexts/PropsContext';
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
useChatUIControls,
|
|
16
|
-
ChatType,
|
|
17
|
-
} from '../src/components/chat-ui/useChatUIControls';
|
|
18
|
-
export type {ChatUIControlsInterface} from '../src/components/chat-ui/useChatUIControls';
|
|
@@ -26,8 +26,8 @@ export {useLocalUserInfo} from '../src/app-state/useLocalUserInfo';
|
|
|
26
26
|
* UI contexts
|
|
27
27
|
*/
|
|
28
28
|
// commented for v1 release
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
export {usePreCall} from '../src/components/precall/usePreCall';
|
|
30
|
+
export type {PreCallContextInterface} from '../src/components/precall/usePreCall';
|
|
31
31
|
export {useLayout} from '../src/utils/useLayout';
|
|
32
32
|
export type {LayoutContextInterface} from '../src/utils/useLayout';
|
|
33
33
|
// commented for v1 release
|
|
@@ -47,5 +47,14 @@ export type {messageInterface} from '../src/app-state/useMessages';
|
|
|
47
47
|
export {SidePanelType} from '../src/subComponents/SidePanelEnum';
|
|
48
48
|
export {useSidePanel} from '../src/utils/useSidePanel';
|
|
49
49
|
|
|
50
|
+
export {useNoiseSupression} from '../src/app-state/useNoiseSupression';
|
|
51
|
+
export {useVideoQuality} from '../src/app-state/useVideoQuality';
|
|
52
|
+
|
|
50
53
|
//hook used to get/set username
|
|
51
54
|
export {default as useUserName} from '../src/utils/useUserName';
|
|
55
|
+
|
|
56
|
+
export {
|
|
57
|
+
useChatUIControls,
|
|
58
|
+
ChatType,
|
|
59
|
+
} from '../src/components/chat-ui/useChatUIControls';
|
|
60
|
+
export type {ChatUIControlsInterface} from '../src/components/chat-ui/useChatUIControls';
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
// 1. Import Events
|
|
2
2
|
import Events from '../src/rtm-events-api/Events';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
EventSource,
|
|
5
|
+
PersistanceLevel,
|
|
6
|
+
EventCallback,
|
|
7
|
+
} from '../src/rtm-events-api';
|
|
4
8
|
|
|
5
9
|
// 2. Initialize with source "fpe"
|
|
6
10
|
const customEvents = new Events(EventSource.fpe);
|
|
7
11
|
|
|
8
12
|
// 3. export
|
|
9
13
|
export {customEvents, PersistanceLevel};
|
|
14
|
+
export type {EventCallback};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//Common components
|
|
2
2
|
export {default as TextInput} from '../src/atoms/TextInput';
|
|
3
3
|
//Icons
|
|
4
|
-
export {Icons} from '../agora-rn-uikit';
|
|
4
|
+
//export {Icons} from '../agora-rn-uikit';
|
|
5
5
|
|
|
6
6
|
// commented for v1 release
|
|
7
7
|
//create screen
|
|
@@ -13,7 +13,7 @@ export {Icons} from '../agora-rn-uikit';
|
|
|
13
13
|
|
|
14
14
|
// commented for v1 release
|
|
15
15
|
//Precall components
|
|
16
|
-
|
|
16
|
+
export * from '../src/components/precall/index';
|
|
17
17
|
|
|
18
18
|
//video call components
|
|
19
19
|
export {
|
|
@@ -33,6 +33,8 @@ export {default as NetworkQualityPill} from '../src/subComponents/NetworkQuality
|
|
|
33
33
|
//videocall screen
|
|
34
34
|
export {default as VideocallScreen} from '../src/pages/video-call/VideoCallScreen';
|
|
35
35
|
export {default as PrecallScreen} from '../src/components/Precall';
|
|
36
|
+
export {default as VBPanel} from '../src/components/virtual-background/VBPanel';
|
|
37
|
+
export {WhiteboardListener} from '../src/components/Controls';
|
|
36
38
|
|
|
37
39
|
// commented for v1 release
|
|
38
40
|
//Settings screen
|
|
@@ -44,11 +46,12 @@ export {default as PrecallScreen} from '../src/components/Precall';
|
|
|
44
46
|
//export {default as LanguageSelector} from '../src/subComponents/LanguageSelector';
|
|
45
47
|
|
|
46
48
|
//Sidepanel buttons
|
|
47
|
-
export {SidePanelButtonsArray} from '../src/subComponents/SidePanelButtons';
|
|
49
|
+
//export {SidePanelButtonsArray} from '../src/subComponents/SidePanelButtons';
|
|
48
50
|
export {
|
|
49
51
|
MaxVideoView as UiKitMaxVideoView,
|
|
50
52
|
ClientRole as UikitClientRole,
|
|
51
53
|
ChannelProfile as UikitChannelProfile,
|
|
54
|
+
PropsContext as UikitPropsContext,
|
|
52
55
|
} from '../agora-rn-uikit';
|
|
53
56
|
export {default as Toolbar} from '../src/atoms/Toolbar';
|
|
54
57
|
export {default as ToolbarItem} from '../src/atoms/ToolbarItem';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//exporting for simple-practice demo
|
|
2
|
+
|
|
3
|
+
import VideoRenderer from '../src/pages/video-call/VideoRenderer';
|
|
4
|
+
import {DispatchContext} from '../agora-rn-uikit';
|
|
5
|
+
import IconButton from '../src/atoms/IconButton';
|
|
6
|
+
import WhiteboardView from '../src/components/whiteboard/WhiteboardView';
|
|
7
|
+
import {
|
|
8
|
+
useWhiteboard,
|
|
9
|
+
whiteboardContext,
|
|
10
|
+
} from '../src/components/whiteboard/WhiteboardConfigure';
|
|
11
|
+
import {useVideoCall} from '../src/components/useVideoCall';
|
|
12
|
+
import {useScreenshare} from '../src/subComponents/screenshare/useScreenshare';
|
|
13
|
+
import EndcallPopup from '../src/subComponents/EndcallPopup';
|
|
14
|
+
import useSTTAPI from '../src/subComponents/caption/useSTTAPI';
|
|
15
|
+
import {useCaption} from '../src/subComponents/caption/useCaption';
|
|
16
|
+
import useMuteToggleLocal, {
|
|
17
|
+
MUTE_LOCAL_TYPE,
|
|
18
|
+
} from '../src/utils/useMuteToggleLocal';
|
|
19
|
+
import {RoomPhase} from 'white-web-sdk';
|
|
20
|
+
import {useScreenContext} from '../src/components/contexts/ScreenShareContext';
|
|
21
|
+
import {filterObject} from '../src/utils/index';
|
|
22
|
+
import {useToggleWhiteboard} from '../src/components/Controls';
|
|
23
|
+
import {ShowInputURL} from '../src/components/Share';
|
|
24
|
+
import useRemoteMute, {MUTE_REMOTE_TYPE} from '../src/utils/useRemoteMute';
|
|
25
|
+
import getCustomRoute from '../src/utils/getCustomRoute';
|
|
26
|
+
import endCallEveryOne from '../src/utils/endCallEveryOne';
|
|
27
|
+
export {
|
|
28
|
+
VideoRenderer,
|
|
29
|
+
DispatchContext,
|
|
30
|
+
IconButton,
|
|
31
|
+
WhiteboardView,
|
|
32
|
+
whiteboardContext,
|
|
33
|
+
useVideoCall,
|
|
34
|
+
useScreenshare,
|
|
35
|
+
EndcallPopup,
|
|
36
|
+
useSTTAPI,
|
|
37
|
+
useCaption,
|
|
38
|
+
useWhiteboard,
|
|
39
|
+
useMuteToggleLocal,
|
|
40
|
+
MUTE_LOCAL_TYPE,
|
|
41
|
+
RoomPhase,
|
|
42
|
+
useScreenContext,
|
|
43
|
+
filterObject,
|
|
44
|
+
useToggleWhiteboard,
|
|
45
|
+
ShowInputURL,
|
|
46
|
+
useRemoteMute,
|
|
47
|
+
MUTE_REMOTE_TYPE,
|
|
48
|
+
getCustomRoute,
|
|
49
|
+
endCallEveryOne,
|
|
50
|
+
};
|