├── .DS_Store
├── .github
└── pull_request_template.md
├── .gitignore
├── .vscode
└── extensions.json
├── Readme.md
├── audio-livecast.config.json
├── audio-livecast.config.light.json
├── config.json
├── config.light.json
├── devSetup.js
├── go.mod
├── go.sum
├── live-streaming.config.json
├── live-streaming.config.light.json
├── package-lock.json
├── package.json
├── template.config.js
├── template
├── .bundle
│ └── config
├── Gemfile
├── Gulpfile.js
├── _eslintrc.js
├── _gitignore
├── _package-lock.json
├── _prettierrc.js
├── _react-native.config.js
├── _watchmanconfig
├── addlicencing.sh
├── android
│ ├── app
│ │ ├── build.gradle
│ │ ├── debug.keystore
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ ├── debug
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── helloworld
│ │ │ │ └── ReactNativeFlipper.java
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── assets
│ │ │ │ └── fonts
│ │ │ │ │ ├── SourceSansPro-Regular.ttf
│ │ │ │ │ └── icomoon.ttf
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── helloworld
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ ├── MainApplication.java
│ │ │ │ │ └── SSLPinningFactory.java
│ │ │ └── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── release
│ │ │ └── java
│ │ │ └── com
│ │ │ └── helloworld
│ │ │ └── ReactNativeFlipper.java
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── link-assets-manifest.json
│ └── settings.gradle
├── app.json
├── babel.config.js
├── bridge
│ ├── rtc
│ │ ├── quality.tsx
│ │ └── webNg
│ │ │ ├── RtcEngine.ts
│ │ │ ├── RtcSurfaceView.tsx
│ │ │ ├── Types.ts
│ │ │ └── index.ts
│ └── rtm
│ │ └── web
│ │ ├── Types.ts
│ │ └── index.ts
├── configTransform.js
├── customization-api
│ ├── action-library.ts
│ ├── app-state.ts
│ ├── atoms.ts
│ ├── customEvents.ts
│ ├── customize.tsx
│ ├── index.ts
│ ├── sub-components.ts
│ ├── temp.ts
│ ├── typeDefinition.ts
│ ├── types.ts
│ └── utils.ts
├── customization-implementation
│ ├── createHook.ts
│ ├── dummyConfig.ts
│ ├── index.ts
│ └── useCustomization.tsx
├── customization.config.js
├── defaultConfig.js
├── electron-builder.js
├── electron
│ ├── entitlements.mac.plist
│ ├── index.html
│ ├── main
│ │ └── index.js
│ └── renderer
│ │ └── index.js
├── esbuild.rsdk.go
├── esbuildConfigTransform.js
├── global.d.ts
├── index.js
├── index.rsdk.tsx
├── index.web.js
├── index.wsdk.tsx
├── ios
│ ├── .xcode.env
│ ├── File.swift
│ ├── HelloWorld-Bridging-Header.h
│ ├── HelloWorld-tvOS
│ │ └── Info.plist
│ ├── HelloWorld-tvOSTests
│ │ └── Info.plist
│ ├── HelloWorld.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── HelloWorld-tvOS.xcscheme
│ │ │ ├── HelloWorld.xcscheme
│ │ │ └── ScreenSharing.xcscheme
│ ├── HelloWorld.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── HelloWorld
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.mm
│ │ ├── HelloWorld.entitlements
│ │ ├── HelloWorldDebug.entitlements
│ │ ├── Images.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ ├── LaunchScreen.storyboard
│ │ └── main.m
│ ├── HelloWorldTests
│ │ ├── HelloWorldTests.m
│ │ └── Info.plist
│ ├── Podfile
│ ├── Podfile.lock
│ ├── ScreenSharing
│ │ ├── Info.plist
│ │ ├── SampleHandler.h
│ │ └── SampleHandler.m
│ └── link-assets-manifest.json
├── jest.config.js
├── licencing.txt
├── metro.config.js
├── nativeDeps.js
├── notarize.js
├── package.json
├── react-native-toast-message
│ ├── .eslintrc.js
│ ├── .gitignore
│ ├── .npmignore
│ ├── .prettierrc.js
│ ├── LICENSE
│ ├── babel.config.js
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── jest.setup.js
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── __tests__
│ │ │ └── Toast.test.js
│ │ ├── assets
│ │ │ ├── icons
│ │ │ │ ├── close.png
│ │ │ │ ├── close@2x.png
│ │ │ │ ├── close@3x.png
│ │ │ │ ├── error.png
│ │ │ │ ├── error@2x.png
│ │ │ │ ├── error@3x.png
│ │ │ │ ├── info.png
│ │ │ │ ├── info@2x.png
│ │ │ │ ├── info@3x.png
│ │ │ │ ├── success.png
│ │ │ │ ├── success@2x.png
│ │ │ │ └── success@3x.png
│ │ │ └── index.js
│ │ ├── colors
│ │ │ └── index.js
│ │ ├── components
│ │ │ ├── __tests__
│ │ │ │ ├── Base.test.js
│ │ │ │ ├── ErrorToast.test.js
│ │ │ │ ├── Icon.test.js
│ │ │ │ ├── InfoToast.test.js
│ │ │ │ └── SuccessToast.test.js
│ │ │ ├── base
│ │ │ │ ├── index.js
│ │ │ │ └── styles.js
│ │ │ ├── checkbox.js
│ │ │ ├── error.js
│ │ │ ├── icon
│ │ │ │ ├── index.js
│ │ │ │ └── styles.js
│ │ │ ├── info.js
│ │ │ └── success.js
│ │ ├── index.js
│ │ ├── index.sdk.tsx
│ │ ├── styles.js
│ │ ├── styles.sdk.ts
│ │ └── utils
│ │ │ ├── arr.js
│ │ │ ├── obj.js
│ │ │ ├── platform.js
│ │ │ └── prop-types.js
│ └── yarn.lock
├── react-native.config.js
├── src
│ ├── .DS_Store
│ ├── App.tsx
│ ├── AppRoutes.tsx
│ ├── AppWrapper.tsx
│ ├── SDKAppWrapper.tsx
│ ├── ai-agent
│ │ ├── ai-interface
│ │ │ ├── 1.Not-Joined.mp4
│ │ │ ├── 2.Joining.mp4
│ │ │ ├── 3.Ambient.mp4
│ │ │ ├── 4.Listening.mp4
│ │ │ ├── 5.Talking.mp4
│ │ │ ├── 6.Disconnected.mp4
│ │ │ └── AIAgentInterface.tsx
│ │ ├── assets
│ │ │ ├── close.png
│ │ │ ├── join-call.png
│ │ │ ├── leave-call.png
│ │ │ ├── mic-off.png
│ │ │ ├── mic-on.png
│ │ │ ├── settings.png
│ │ │ └── transcript.png
│ │ ├── components
│ │ │ ├── AgentControls
│ │ │ │ ├── AgentContext.tsx
│ │ │ │ ├── const.ts
│ │ │ │ ├── index.tsx
│ │ │ │ └── message.ts
│ │ │ ├── AudioVisualizer.tsx
│ │ │ ├── Bottombar.tsx
│ │ │ ├── ControlButtons.tsx
│ │ │ ├── CustomChatPanel.tsx
│ │ │ ├── CustomCreate.tsx
│ │ │ ├── CustomSettingsPanel.tsx
│ │ │ ├── FallbackLogo.tsx
│ │ │ ├── LocalAudioWave.tsx
│ │ │ ├── SelectAiAgent.tsx
│ │ │ ├── SelectAiAgentVoice.tsx
│ │ │ ├── SelectUserLanguage.tsx
│ │ │ ├── UserPrompt.tsx
│ │ │ ├── agent-chat-panel
│ │ │ │ └── agent-chat-ui.tsx
│ │ │ ├── mobile
│ │ │ │ ├── Bottombar.tsx
│ │ │ │ ├── MobileLayoutComponent.tsx
│ │ │ │ └── Topbar.tsx
│ │ │ ├── react-audio-visualize
│ │ │ │ ├── LiveAudioVisualizer
│ │ │ │ │ ├── LiveAudioVisualizer.tsx
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── utils.ts
│ │ │ │ └── index.ts
│ │ │ └── utils.ts
│ │ ├── index.tsx
│ │ ├── layout
│ │ │ ├── AIWithLocalUser.tsx
│ │ │ ├── ConversationalAI.tsx
│ │ │ ├── DefaultAIOnly.tsx
│ │ │ └── NewAnimation.tsx
│ │ ├── routes
│ │ │ ├── CustomLoginRoute.tsx
│ │ │ └── CustomValidateRoute.tsx
│ │ └── utils.ts
│ ├── app-state
│ │ ├── useBeautyEffects.ts
│ │ ├── useLocalUserInfo.ts
│ │ ├── useMessages.ts
│ │ ├── useNoiseSupression.native.tsx
│ │ ├── useNoiseSupression.tsx
│ │ ├── useVideoQuality.tsx
│ │ └── useVirtualBackground.ts
│ ├── assets
│ │ ├── apple.png
│ │ ├── font-styles.css
│ │ ├── fonts
│ │ │ ├── SourceSansPro-Regular.ttf
│ │ │ └── icomoon.ttf
│ │ ├── google.png
│ │ ├── microsoft.png
│ │ ├── permission.png
│ │ ├── selection.json
│ │ └── slack.png
│ ├── atoms
│ │ ├── ActionMenu.tsx
│ │ ├── AnimatedActiveSpeaker.native.tsx
│ │ ├── AnimatedActiveSpeaker.tsx
│ │ ├── AnimatedRings.native.tsx
│ │ ├── AnimatedRings.tsx
│ │ ├── Avatar.tsx
│ │ ├── Card.tsx
│ │ ├── Carousel.native.tsx
│ │ ├── Carousel.tsx
│ │ ├── Checkbox.tsx
│ │ ├── CircularProgress.native.tsx
│ │ ├── CircularProgress.tsx
│ │ ├── ClipboardIconButton.tsx
│ │ ├── CustomIcon.tsx
│ │ ├── CustomSwitch.tsx
│ │ ├── DropDownMulti.tsx
│ │ ├── Dropdown.tsx
│ │ ├── HorizontalRule.tsx
│ │ ├── IconButton.tsx
│ │ ├── ImageIcon.tsx
│ │ ├── InfoBubble.tsx
│ │ ├── InlineNotification.tsx
│ │ ├── InlinePopup.tsx
│ │ ├── Input.tsx
│ │ ├── InviteInfo.tsx
│ │ ├── LinkButton.tsx
│ │ ├── MeetingLink.tsx
│ │ ├── OutlineButton.tsx
│ │ ├── ParticipantsCount.tsx
│ │ ├── Popup.tsx
│ │ ├── PrimaryButton.tsx
│ │ ├── RecordingInfo.tsx
│ │ ├── SecondaryButton.tsx
│ │ ├── Spacer.tsx
│ │ ├── TertiaryButton.tsx
│ │ ├── TextInput.tsx
│ │ ├── Toggle.tsx
│ │ ├── Toolbar.tsx
│ │ ├── ToolbarItem.tsx
│ │ ├── ToolbarMenu.tsx
│ │ ├── ToolbarMenuItem.tsx
│ │ ├── ToolbarPreset.tsx
│ │ ├── Tooltip.native.tsx
│ │ ├── Tooltip.tsx
│ │ ├── UserActionMenuPreset.tsx
│ │ ├── UserAvatar.tsx
│ │ └── pagination
│ │ │ ├── Pagination.tsx
│ │ │ └── usePagination.tsx
│ ├── auth
│ │ ├── AuthProvider.tsx
│ │ ├── AuthRoute.tsx
│ │ ├── IDPAuth.electron.tsx
│ │ ├── IDPAuth.tsx
│ │ ├── IDPLogoutComponent.tsx
│ │ ├── UserCancelPopup.tsx
│ │ ├── config.ts
│ │ ├── openIDPURL.electron.tsx
│ │ ├── openIDPURL.native.tsx
│ │ ├── openIDPURL.tsx
│ │ ├── useIDPAuth.electron.tsx
│ │ ├── useIDPAuth.native.tsx
│ │ ├── useIDPAuth.tsx
│ │ └── useTokenAuth.tsx
│ ├── components
│ │ ├── Chat.tsx
│ │ ├── ChatContext.ts
│ │ ├── ColorConfigure.tsx
│ │ ├── ColorContext.ts
│ │ ├── CommonStyles.ts
│ │ ├── Controls.tsx
│ │ ├── Controls1.native.tsx
│ │ ├── CustomSidePanel.tsx
│ │ ├── DeviceConfigure.native.tsx
│ │ ├── DeviceConfigure.tsx
│ │ ├── DeviceContext.tsx
│ │ ├── ErrorBoundary.tsx
│ │ ├── ErrorBoundaryFallback.tsx
│ │ ├── EventsConfigure.tsx
│ │ ├── GraphQLProvider.tsx
│ │ ├── GridVideo.tsx
│ │ ├── HostControlView.tsx
│ │ ├── JoinPhrase.tsx
│ │ ├── Leftbar.tsx
│ │ ├── Navbar.tsx
│ │ ├── NavbarMobile.tsx
│ │ ├── Navigation.electron.tsx
│ │ ├── Navigation.native.tsx
│ │ ├── Navigation.sdk.tsx
│ │ ├── Navigation.tsx
│ │ ├── NetworkQualityContext.tsx
│ │ ├── ParticipantsView.tsx
│ │ ├── PinnedVideo.tsx
│ │ ├── Precall.native.tsx
│ │ ├── Precall.tsx
│ │ ├── PrivateRoute.tsx
│ │ ├── RTMConfigure.tsx
│ │ ├── Rightbar.tsx
│ │ ├── Router.electron.ts
│ │ ├── Router.native.ts
│ │ ├── Router.sdk.ts
│ │ ├── Router.ts
│ │ ├── SdkApiContext.tsx
│ │ ├── SdkMuteToggleListener.tsx
│ │ ├── SessionContext.tsx
│ │ ├── Settings.tsx
│ │ ├── SettingsView.tsx
│ │ ├── Share.tsx
│ │ ├── StorageContext.tsx
│ │ ├── ToastComponent.tsx
│ │ ├── WhiteboardLayout.tsx
│ │ ├── beauty-effect
│ │ │ ├── useBeautyEffects.native.tsx
│ │ │ └── useBeautyEffects.tsx
│ │ ├── chat-messages
│ │ │ └── useChatMessages.tsx
│ │ ├── chat-notification
│ │ │ └── useChatNotification.tsx
│ │ ├── chat-ui
│ │ │ └── useChatUIControls.tsx
│ │ ├── chat
│ │ │ ├── chatConfigure.native.tsx
│ │ │ └── chatConfigure.tsx
│ │ ├── common
│ │ │ ├── Error.tsx
│ │ │ ├── Logo.tsx
│ │ │ └── index.tsx
│ │ ├── contexts
│ │ │ ├── LiveStreamDataContext.tsx
│ │ │ ├── ScreenShareContext.tsx
│ │ │ ├── VideoMeetingDataContext.tsx
│ │ │ ├── WaitingRoomContext.tsx
│ │ │ └── WhiteboardContext.tsx
│ │ ├── controls
│ │ │ ├── toolbar-items
│ │ │ │ ├── ChatToolbarItem.tsx
│ │ │ │ ├── InviteToolbarItem.tsx
│ │ │ │ ├── ParticipantToolbarItem.tsx
│ │ │ │ ├── ScreenshareToolbarItem.tsx
│ │ │ │ ├── SettingsToolbarItem.tsx
│ │ │ │ └── index.ts
│ │ │ └── useControlPermissionMatrix.tsx
│ │ ├── dimension
│ │ │ ├── DimensionContext.ts
│ │ │ └── DimensionProvider.tsx
│ │ ├── disable-chat
│ │ │ └── useDisableChat.tsx
│ │ ├── livestream
│ │ │ ├── LiveStreamContext.tsx
│ │ │ ├── Types.ts
│ │ │ ├── index.ts
│ │ │ └── views
│ │ │ │ ├── LiveStreamAttendeeLandingTile.tsx
│ │ │ │ └── LiveStreamControls.tsx
│ │ ├── meeting-info-invite
│ │ │ ├── MeetingInfo.tsx
│ │ │ ├── MeetingInfoCardHeader.tsx
│ │ │ ├── MeetingInfoGridTile.tsx
│ │ │ └── MeetingInfoLinks.tsx
│ │ ├── participants
│ │ │ ├── AllAudienceParticipants.tsx
│ │ │ ├── AllHostParticipants.tsx
│ │ │ ├── Participant.tsx
│ │ │ ├── ParticipantName.tsx
│ │ │ ├── ParticipantSectionTitle.tsx
│ │ │ ├── ScreenshareParticipants.tsx
│ │ │ ├── UserActionMenuOptions.tsx
│ │ │ └── WaitingRoomParticipants.tsx
│ │ ├── popups
│ │ │ ├── InvitePopup.tsx
│ │ │ ├── StartScreenSharePopup.native.tsx
│ │ │ ├── StartScreenSharePopup.tsx
│ │ │ ├── StopRecordingPopup.tsx
│ │ │ ├── StopScreenSharePopup.native.tsx
│ │ │ ├── StopScreenSharePopup.tsx
│ │ │ └── WhiteboardClearAllPopup.tsx
│ │ ├── precall
│ │ │ ├── LocalMute.tsx
│ │ │ ├── LocalMute1.native.tsx
│ │ │ ├── PermissionHelper.native.tsx
│ │ │ ├── PermissionHelper.tsx
│ │ │ ├── PreCallSettings.tsx
│ │ │ ├── VideoFallback.tsx
│ │ │ ├── VideoPreview.native.tsx
│ │ │ ├── VideoPreview.tsx
│ │ │ ├── index.tsx
│ │ │ ├── joinCallBtn.native.tsx
│ │ │ ├── joinCallBtn.tsx
│ │ │ ├── joinWaitingRoomBtn.native.tsx
│ │ │ ├── joinWaitingRoomBtn.tsx
│ │ │ ├── meetingTitle.tsx
│ │ │ ├── selectDevice.tsx
│ │ │ ├── textInput.tsx
│ │ │ └── usePreCall.tsx
│ │ ├── recording-bot
│ │ │ └── RecordingBotRoute.tsx
│ │ ├── recordings
│ │ │ ├── RecordingDeletePopup.tsx
│ │ │ ├── RecordingsDateTable.tsx
│ │ │ ├── RecordingsModal.tsx
│ │ │ ├── ViewRecordingsModal.tsx
│ │ │ ├── recording-table.tsx
│ │ │ ├── style.ts
│ │ │ └── utils.ts
│ │ ├── room-info
│ │ │ ├── useRoomInfo.tsx
│ │ │ └── useSetRoomInfo.tsx
│ │ ├── styles.ts
│ │ ├── useMount.ts
│ │ ├── useShareLink.tsx
│ │ ├── useToast.tsx
│ │ ├── useUserActionMenu.tsx
│ │ ├── useUserPreference.tsx
│ │ ├── useVideoCall.tsx
│ │ ├── useWakeLock.tsx
│ │ ├── virtual-background
│ │ │ ├── VBButton.tsx
│ │ │ ├── VBCard.native.tsx
│ │ │ ├── VBCard.tsx
│ │ │ ├── VBPanel.tsx
│ │ │ ├── VButils.native.ts
│ │ │ ├── VButils.ts
│ │ │ ├── VideoPreview.native.tsx
│ │ │ ├── VideoPreview.tsx
│ │ │ ├── imagePaths.ts
│ │ │ ├── images
│ │ │ │ ├── beachImageBase64.ts
│ │ │ │ ├── bedroomImageBase64.ts
│ │ │ │ ├── bookImageBase64.ts
│ │ │ │ ├── earthImageBase64.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── lampImageBase64.ts
│ │ │ │ ├── mountainsImageBase64.ts
│ │ │ │ ├── office1ImageBase64.ts
│ │ │ │ ├── officeImageBase64.ts
│ │ │ │ ├── plantsImageBase64.ts
│ │ │ │ ├── skyImageBase64.ts
│ │ │ │ └── wallImageBase64.ts
│ │ │ ├── useVB.native.tsx
│ │ │ └── useVB.tsx
│ │ └── whiteboard
│ │ │ ├── StrokeWidthTool.tsx
│ │ │ ├── WhiteboardButton.tsx
│ │ │ ├── WhiteboardCanvas.tsx
│ │ │ ├── WhiteboardConfigure.native.tsx
│ │ │ ├── WhiteboardConfigure.tsx
│ │ │ ├── WhiteboardCursor.tsx
│ │ │ ├── WhiteboardToolBox.tsx
│ │ │ ├── WhiteboardView.native.tsx
│ │ │ ├── WhiteboardView.tsx
│ │ │ ├── WhiteboardWidget.tsx
│ │ │ └── WhiteboardWrapper.tsx
│ ├── language
│ │ ├── default-labels
│ │ │ ├── commonLabels.ts
│ │ │ ├── createScreenLabels.ts
│ │ │ ├── index.ts
│ │ │ ├── joinScreenLabels.ts
│ │ │ ├── precallScreenLabels.ts
│ │ │ ├── shareLinkScreenLabels.ts
│ │ │ └── videoCallScreenLabels.ts
│ │ ├── i18nTypes.ts
│ │ ├── index.ts
│ │ └── useLanguage.tsx
│ ├── logger
│ │ ├── AppBuilderLogger.tsx
│ │ ├── constants.ts
│ │ └── transports
│ │ │ ├── agora-transport.native.ts
│ │ │ ├── agora-transport.ts
│ │ │ └── customer-transport.ts
│ ├── pages
│ │ ├── Authenticate.tsx
│ │ ├── Create.tsx
│ │ ├── Endcall.tsx
│ │ ├── Join.tsx
│ │ ├── Login.tsx
│ │ ├── VideoCall.tsx
│ │ ├── create
│ │ │ └── useCreate.tsx
│ │ └── video-call
│ │ │ ├── ActionSheet.native.tsx
│ │ │ ├── ActionSheet.tsx
│ │ │ ├── ActionSheetContent.tsx
│ │ │ ├── ActionSheetHandle.tsx
│ │ │ ├── ActionSheetStyles.css
│ │ │ ├── DefaultLayouts.ts
│ │ │ ├── NameWithMicIcon.tsx
│ │ │ ├── PinchableView.tsx
│ │ │ ├── RenderComponent.tsx
│ │ │ ├── SidePanelHeader.tsx
│ │ │ ├── SpotlightHighlighter.tsx
│ │ │ ├── VideoCallMobileView.tsx
│ │ │ ├── VideoCallScreen.native.tsx
│ │ │ ├── VideoCallScreen.tsx
│ │ │ ├── VideoCallScreenWrapper.tsx
│ │ │ ├── VideoComponent.tsx
│ │ │ ├── VideoRenderer.tsx
│ │ │ ├── VisibilitySensor.tsx
│ │ │ ├── ZoomableWrapper.native.tsx
│ │ │ ├── ZoomableWrapper.tsx
│ │ │ ├── index.ts
│ │ │ └── useLayoutsData.ts
│ ├── rtm-events-api
│ │ ├── Events.ts
│ │ ├── LocalEvents.ts
│ │ ├── index.tsx
│ │ └── types.ts
│ ├── rtm-events
│ │ ├── EventUtils.ts
│ │ ├── EventsQueue.ts
│ │ ├── constants.ts
│ │ └── index.tsx
│ ├── rtm
│ │ ├── RTMEngine.ts
│ │ └── utils.ts
│ ├── selection.json
│ ├── subComponents
│ │ ├── .DS_Store
│ │ ├── BlockUI.tsx
│ │ ├── ChatBubble.tsx
│ │ ├── ChatContainer.tsx
│ │ ├── ChatInput.native.tsx
│ │ ├── ChatInput.tsx
│ │ ├── Checkbox.native.tsx
│ │ ├── Checkbox.tsx
│ │ ├── Clipboard.native.tsx
│ │ ├── Clipboard.tsx
│ │ ├── CopyJoinInfo.tsx
│ │ ├── EndcallPopup.tsx
│ │ ├── Error.tsx
│ │ ├── FallbackLogo.tsx
│ │ ├── Illustration.native.tsx
│ │ ├── Illustration.tsx
│ │ ├── LanguageSelector.tsx
│ │ ├── LayoutIconButton.tsx
│ │ ├── LayoutIconDropdown.tsx
│ │ ├── LayoutIconDropdown1.native.tsx
│ │ ├── Loading.tsx
│ │ ├── LocalAudioMute.tsx
│ │ ├── LocalEndCall.tsx
│ │ ├── LocalSwitchCamera.tsx
│ │ ├── LocalVideoMute.tsx
│ │ ├── Logo.tsx
│ │ ├── LogoutButton.tsx
│ │ ├── NetworkQualityPill.tsx
│ │ ├── OpenInNativeButton.tsx
│ │ ├── Platform.electron.ts
│ │ ├── Platform.native.ts
│ │ ├── Platform.ts
│ │ ├── Recording.tsx
│ │ ├── RemoteAudioMute.tsx
│ │ ├── RemoteEndCall.tsx
│ │ ├── RemoteMutePopup.tsx
│ │ ├── RemoteVideoMute.tsx
│ │ ├── RemoveMeetingPopup.tsx
│ │ ├── RemoveScreensharePopup.tsx
│ │ ├── ScreenShareNotice.tsx
│ │ ├── SelectDevice.tsx
│ │ ├── SelectDeviceSettings.backup.tsx
│ │ ├── SelectOAuth.tsx
│ │ ├── SidePanelButtons.ts
│ │ ├── SidePanelEnum.tsx
│ │ ├── SidePanelHeader.tsx
│ │ ├── TextWithTooltip.native.tsx
│ │ ├── TextWithTooltip.tsx
│ │ ├── ToastConfig.tsx
│ │ ├── Watermark.tsx
│ │ ├── caption
│ │ │ ├── Caption.tsx
│ │ │ ├── CaptionContainer.tsx
│ │ │ ├── CaptionIcon.tsx
│ │ │ ├── CaptionText.tsx
│ │ │ ├── DownloadTranscriptBtn.tsx
│ │ │ ├── LanguageSelectorPopup.tsx
│ │ │ ├── Transcript.tsx
│ │ │ ├── TranscriptIcon.tsx
│ │ │ ├── TranscriptText.tsx
│ │ │ ├── index.ts
│ │ │ ├── proto
│ │ │ │ ├── ptoto.js
│ │ │ │ └── test.proto
│ │ │ ├── useCaption.tsx
│ │ │ ├── useCaptionWidth.ts
│ │ │ ├── useSTTAPI.tsx
│ │ │ ├── useStreamMessageUtils.native.ts
│ │ │ ├── useStreamMessageUtils.ts
│ │ │ ├── useTranscriptDownload.native.ts
│ │ │ ├── useTranscriptDownload.ts
│ │ │ └── utils.ts
│ │ ├── chat
│ │ │ ├── ChatActionMenu.tsx
│ │ │ ├── ChatAttachment.native.tsx
│ │ │ ├── ChatAttachment.tsx
│ │ │ ├── ChatEmoji.native.tsx
│ │ │ ├── ChatEmoji.tsx
│ │ │ ├── ChatParticipants.tsx
│ │ │ ├── ChatQuickActionsMenu.tsx
│ │ │ ├── ChatSendButton.tsx
│ │ │ ├── ChatUploadStatus.tsx
│ │ │ ├── ImagePopup.tsx
│ │ │ └── PinnedMessage.tsx
│ │ ├── livestream
│ │ │ ├── ApprovedLiveStreamControlsView.tsx
│ │ │ ├── CurrentLiveStreamRequestsView.tsx
│ │ │ ├── controls
│ │ │ │ ├── LocalRaiseHand.tsx
│ │ │ │ ├── RemoteLiveStreamApprovedRequestRecall.tsx
│ │ │ │ ├── RemoteLiveStreamRequestApprove.tsx
│ │ │ │ └── RemoteLiveStreamRequestReject.tsx
│ │ │ └── index.ts
│ │ ├── recording
│ │ │ ├── useIsRecordingBot.tsx
│ │ │ ├── useRecording.tsx
│ │ │ └── useRecordingLayoutQuery.tsx
│ │ ├── screenshare
│ │ │ ├── ScreenshareButton.tsx
│ │ │ ├── ScreenshareConfigure.native.tsx
│ │ │ ├── ScreenshareConfigure.tsx
│ │ │ └── useScreenshare.tsx
│ │ └── waiting-rooms
│ │ │ ├── WaitingRoomControls.tsx
│ │ │ └── useWaitingRoomAPI.ts
│ ├── theme
│ │ └── index.ts
│ ├── utils
│ │ ├── PlatformWrapper.tsx
│ │ ├── SdkEvents.ts
│ │ ├── SdkMethodEvents.ts
│ │ ├── axiomLogger.ts
│ │ ├── book.jpg
│ │ ├── common.tsx
│ │ ├── constants.ts
│ │ ├── eventEmitter.ts
│ │ ├── fetch-retry.ts
│ │ ├── getCustomRoute.ts
│ │ ├── getUniqueID.ts
│ │ ├── hexadecimalTransparency.ts
│ │ ├── index.tsx
│ │ ├── isMobileOrTablet.native.ts
│ │ ├── isMobileOrTablet.ts
│ │ ├── isSDK.sdk.ts
│ │ ├── isSDK.ts
│ │ ├── pendingStateUpdateHelper.ts
│ │ ├── useActionSheet.tsx
│ │ ├── useActiveSpeaker.ts
│ │ ├── useActiveUids.ts
│ │ ├── useAppState.ts
│ │ ├── useAsyncEffect.ts
│ │ ├── useCreateRoom.ts
│ │ ├── useEndCall.ts
│ │ ├── useFindActiveSpeaker.native.ts
│ │ ├── useFindActiveSpeaker.ts
│ │ ├── useFocus.tsx
│ │ ├── useFullScreen.native.ts
│ │ ├── useFullScreen.ts
│ │ ├── useGetHostUids.ts
│ │ ├── useGetLiveStreamingRequests.ts
│ │ ├── useGetMeetingPhrase.ts
│ │ ├── useGetName.ts
│ │ ├── useHideShareTile.tsx
│ │ ├── useIsAttendee.ts
│ │ ├── useIsAudioEnabled.ts
│ │ ├── useIsHandRaised.ts
│ │ ├── useIsHost.ts
│ │ ├── useIsLocalUserSpeaking.native.ts
│ │ ├── useIsLocalUserSpeaking.ts
│ │ ├── useIsPSTN.ts
│ │ ├── useIsScreenShare.ts
│ │ ├── useIsVideoEnabled.ts
│ │ ├── useJoinRoom.ts
│ │ ├── useLayout.tsx
│ │ ├── useLiveStreamingUids.ts
│ │ ├── useLocalAudio.ts
│ │ ├── useLocalShareScreenUid.ts
│ │ ├── useLocalVideo.ts
│ │ ├── useMenu.tsx
│ │ ├── useModal.tsx
│ │ ├── useMutePSTN.ts
│ │ ├── useMuteToggleLocal.ts
│ │ ├── useOrientation.native.tsx
│ │ ├── useOrientation.tsx
│ │ ├── useRemoteEndCall.ts
│ │ ├── useRemoteEndScreenshare.ts
│ │ ├── useRemoteMute.ts
│ │ ├── useRemoteRequest.ts
│ │ ├── useSearchParams.tsx
│ │ ├── useSetName.ts
│ │ ├── useSidePanel.tsx
│ │ ├── useSpeechToText.ts
│ │ ├── useSpotlight.ts
│ │ ├── useString.ts
│ │ ├── useSwitchCamera.native.tsx
│ │ ├── useSwitchCamera.tsx
│ │ ├── useToolbar.tsx
│ │ ├── useUserBan.ts
│ │ └── useUserName.ts
│ └── wasms
│ │ └── agora-virtual-background.wasm
├── static.d.ts
├── templates
│ ├── index.html
│ └── mobile.html
├── theme-light.json
├── tsconfig.json
├── tsconfig_fpeApi.json
├── tsconfig_rsdk_index.json
├── tsconfig_wsdk_index.json
├── web
│ └── index.html
├── webpack.commons.js
├── webpack.main.config.js
├── webpack.renderer.config.js
├── webpack.rsdk.config.js
├── webpack.ts.config.js
├── webpack.web.config.js
└── webpack.wsdk.config.js
├── theme.json
├── vercel.json
├── voice-chat.config.json
└── voice-chat.config.light.json
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/.DS_Store
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | # Related Issue
2 | - Mention your issue description here
3 | - clickup ticket
4 |
5 | # Propossed changes/Fix
6 | - Change 1
7 | - Change 2
8 | - ...
9 |
10 | # Additional Info
11 | - Any additional info or context for the reviewer
12 |
13 | # Checklist
14 | - [ ] Tested on local/dev branch for all major platforms (Android, IOS, Desktop, Web).
15 | - [ ] No commented out code
16 | - [ ] Is any third party library, service used
17 | - [ ] Tests
18 | - [ ] If this change requires updates outside of the code, like updates in core, react-ui-kit, RTM/RTC configure.
19 |
20 | # Dependent PRs
21 | - Mention dependent PR links.
22 |
23 |
24 | # Screenshots
25 |
26 | Original | Updated
27 | :---------------------: | :-----------------------:
28 | **original screenshot** | **updated screenshot**
29 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "esbenp.prettier-vscode"
4 | ]
5 | }
--------------------------------------------------------------------------------
/Readme.md:
--------------------------------------------------------------------------------
1 | # App builder core
2 |
3 | This repository is a part of [RTE app builder](https://appbuilder.agora.io).
4 |
5 | ## Development instructions
6 |
7 | 1. Clone the repo
8 |
9 | 2. Navigate into project directory and run:
10 |
11 | ```
12 | npm run dev-setup -- meeting
13 | npm run dev-setup -- live-streaming
14 | npm run dev-setup -- voice-chat
15 | npm run dev-setup -- audio-livecast
16 | ```
17 |
18 | By default, the setup will pick the dark theme. for light theme setup, add light keyword at the end of command
19 |
20 | `npm run dev-setup -- meeting light`
21 |
22 | This command will automatically set everything up for development
23 |
24 | To build react sdk using esbuild,
25 |
26 | 1. Install the go compiler from https://go.dev/doc/install
27 | 2. Run `go mod tidy` to download dependencies
28 |
29 | You can now build react sdk using esbuild through npm script
30 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module AgoraIO-Community/app-builder-core
2 |
3 | go 1.18
4 |
5 | require (
6 | github.com/davecgh/go-spew v1.1.1
7 | github.com/evanw/esbuild v0.14.43
8 | )
9 |
10 | require golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365 // indirect
11 |
--------------------------------------------------------------------------------
/go.sum:
--------------------------------------------------------------------------------
1 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
2 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3 | github.com/evanw/esbuild v0.14.43 h1:4WIYkAf2fLmru3KYtKUB6mdBl4dgpoVcq7hqXhXGVG0=
4 | github.com/evanw/esbuild v0.14.43/go.mod h1:GG+zjdi59yh3ehDn4ZWfPcATxjPDUH53iU4ZJbp7dkY=
5 | golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365 h1:6wSTsvPddg9gc/mVEEyk9oOAoxn+bT4Z9q1zx+4RwA4=
6 | golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
7 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "agora-appbuilder-core",
3 | "version": "4.1.7",
4 | "lockfileVersion": 1
5 | }
6 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "agora-appbuilder-core",
3 | "version": "4.1.7",
4 | "description": "React Native template for RTE app builder",
5 | "main": "index.js",
6 | "files": [
7 | "template",
8 | "template.config.js"
9 | ],
10 | "scripts": {
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/appbuilder-ui-kit.git template/agora-rn-uikit && cd template/agora-rn-uikit && git checkout appbuilder-uikit-3.1.4",
13 | "deps": "cd template && npm i --force",
14 | "dev-setup": "npm run uikit && npm run deps && node devSetup.js",
15 | "web-build": "cd template && npm run web:build && cd .. && npm run copy-vercel",
16 | "copy-vercel": "cp -r Builds/web template/dist && cp vercel.json template/dist",
17 | "pre-release": "cd template && cp _package-lock.json package-lock.json"
18 | },
19 | "author": {
20 | "email": "svineth.face@gmail.com",
21 | "name": "Vineeth S"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/template.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | placeholderName: 'HelloWorld',
3 | templateDir: './template',
4 | }
5 |
--------------------------------------------------------------------------------
/template/.bundle/config:
--------------------------------------------------------------------------------
1 | BUNDLE_PATH: "vendor/bundle"
2 | BUNDLE_FORCE_RUBY_PLATFORM: 1
--------------------------------------------------------------------------------
/template/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
3 | ruby ">= 2.6.10"
4 | gem 'cocoapods', '~> 1.12'
--------------------------------------------------------------------------------
/template/_eslintrc.js:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | module.exports = {
13 | root: true,
14 | extends: '@react-native',
15 | parser: '@typescript-eslint/parser',
16 | plugins: ['@typescript-eslint'],
17 | globals: {
18 | $config: true,
19 | },
20 | };
21 |
--------------------------------------------------------------------------------
/template/_gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 |
24 | # Android/IntelliJ
25 | #
26 | build/
27 | .idea
28 | .gradle
29 | local.properties
30 | *.iml
31 |
32 | # Visual Studio Code
33 | #
34 | .vscode/
35 |
36 | # node.js
37 | #
38 | node_modules/
39 | npm-debug.log
40 | yarn-error.log
41 |
42 | # fastlane
43 | #
44 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
45 | # screenshots whenever they are needed.
46 | # For more information about the recommended setup visit:
47 | # https://docs.fastlane.tools/best-practices/source-control/
48 |
49 | **/fastlane/report.xml
50 | **/fastlane/Preview.html
51 | **/fastlane/screenshots
52 | **/fastlane/test_output
53 |
54 | # Bundle artifact
55 | *.jsbundle
56 |
57 | # Ruby / CocoaPods
58 | /ios/Pods/
59 | /vendor/bundle/
60 |
61 | #UI Kit
62 | agora-rn-uikit/
63 |
64 | #built website
65 | dist/
66 |
67 | #Electron cache
68 | .electron/
69 | .webpack/
70 | out/
71 |
72 | #Customization plugin folder
73 | template/customization/*
74 |
75 | # Temporary files created by Metro to check the health of the file watcher
76 | .metro-health-check*
77 | # testing
78 | /coverage
--------------------------------------------------------------------------------
/template/_prettierrc.js:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | module.exports = {
13 | arrowParens: 'avoid',
14 | bracketSameLine: true,
15 | bracketSpacing: false,
16 | singleQuote: true,
17 | trailingComma: 'all',
18 | };
19 |
--------------------------------------------------------------------------------
/template/_react-native.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | project: {
3 | ios: {},
4 | android: {},
5 | },
6 | assets: ["./src/assets/fonts"]
7 | }
--------------------------------------------------------------------------------
/template/_watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/template/addlicencing.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | for i in $(find templates -name '*.html') # or whatever other pattern...
4 | # for i in *.ts # or whatever other pattern...
5 | do
6 | if ! grep -q Copyright $i
7 | then
8 | cat licencing.txt $i >$i.new && mv $i.new $i
9 | fi
10 | done
--------------------------------------------------------------------------------
/template/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/app/debug.keystore
--------------------------------------------------------------------------------
/template/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/template/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/template/android/app/src/main/assets/fonts/SourceSansPro-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/app/src/main/assets/fonts/SourceSansPro-Regular.ttf
--------------------------------------------------------------------------------
/template/android/app/src/main/assets/fonts/icomoon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/app/src/main/assets/fonts/icomoon.ttf
--------------------------------------------------------------------------------
/template/android/app/src/main/java/com/helloworld/SSLPinningFactory.java:
--------------------------------------------------------------------------------
1 | package com.helloworld;
2 |
3 | import com.facebook.react.modules.network.OkHttpClientFactory;
4 | import com.facebook.react.modules.network.OkHttpClientProvider;
5 | import okhttp3.CertificatePinner;
6 | import okhttp3.OkHttpClient;
7 | import android.content.Context;
8 |
9 | public class SSLPinningFactory implements OkHttpClientFactory {
10 | private Context context;
11 |
12 | public SSLPinningFactory(Context context) {
13 | this.context = context;
14 | }
15 |
16 | public OkHttpClient createNewNetworkModuleClient() {
17 |
18 | String hostname = context.getString(R.string.hostname);
19 | String main_public_key = context.getString(R.string.main_public_key);
20 | String backup_public_key = context.getString(R.string.backup_public_key);
21 |
22 | CertificatePinner certificatePinner = new CertificatePinner.Builder()
23 | .add(hostname, "sha256/"+ main_public_key)
24 | .add(hostname, "sha256/"+ backup_public_key)
25 | .build();
26 |
27 | OkHttpClient.Builder clientBuilder = OkHttpClientProvider.createClientBuilder();
28 | return clientBuilder.certificatePinner(certificatePinner).build();
29 | }
30 | }
--------------------------------------------------------------------------------
/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/template/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 | - #099DFD
3 |
4 |
5 | - @color/blue
6 |
7 |
--------------------------------------------------------------------------------
/template/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Hello App Display Name
3 | managedservices-prod.rteappbuilder.com
4 | 59d0kvzJLl7UOwYCl9KLk+Nzx9fD49Ah5qem+VGG8p8=
5 | ++MBgDH5WGvL9Bcn5Be30cRcL0f5O+NyoXuWtQdX1aI=
6 |
7 |
--------------------------------------------------------------------------------
/template/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/template/android/app/src/release/java/com/helloworld/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | *
This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.helloworld;
8 |
9 | import android.content.Context;
10 | import com.facebook.react.ReactInstanceManager;
11 |
12 | /**
13 | * Class responsible of loading Flipper inside your React Native application. This is the release
14 | * flavor of it so it's empty as we don't want to load Flipper.
15 | */
16 | public class ReactNativeFlipper {
17 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
18 | // Do nothing as we don't want to initialize Flipper on Release.
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/template/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "33.0.0"
6 | minSdkVersion = 24
7 | compileSdkVersion = 34
8 | targetSdkVersion = 34
9 |
10 | // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
11 | ndkVersion = "23.1.7779620"
12 | kotlinVersion = "1.8.21" // added this for datadog logs - https://docs.datadoghq.com/real_user_monitoring/mobile_and_tv_monitoring/setup/reactnative/#setup
13 | androidXAnnotation = "1.2.0"
14 | androidXBrowser = "1.3.0"
15 | }
16 | subprojects { subproject ->
17 | afterEvaluate{
18 | if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
19 | android {
20 | compileSdkVersion rootProject.ext.compileSdkVersion
21 | buildToolsVersion rootProject.ext.buildToolsVersion
22 | }
23 | }
24 | }
25 | }
26 | repositories {
27 | google()
28 | mavenCentral()
29 | }
30 | dependencies {
31 | classpath("com.android.tools.build:gradle")
32 | classpath("com.facebook.react:react-native-gradle-plugin")
33 | }
34 | }
35 |
36 |
37 |
--------------------------------------------------------------------------------
/template/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/template/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
4 | networkTimeout=10000
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
--------------------------------------------------------------------------------
/template/android/link-assets-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "migIndex": 1,
3 | "data": [
4 | {
5 | "path": "src/assets/fonts/SourceSansPro-Regular.ttf",
6 | "sha1": "48d6928e08ba5e2ca1e15d754c146580b1c8febd"
7 | },
8 | {
9 | "path": "src/assets/fonts/icomoon.ttf",
10 | "sha1": "f08065b544237fb6aa60f7a4699a3ef1d7d1abf5"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/template/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'HelloWorld'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 | includeBuild('../node_modules/@react-native/gradle-plugin')
--------------------------------------------------------------------------------
/template/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "HelloWorld",
3 | "displayName": "HelloWorld"
4 | }
--------------------------------------------------------------------------------
/template/babel.config.js:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | const configVars = require('./configTransform');
13 | const { getCustomizationApiPath } = require('./customization.config');
14 |
15 | // This file is read only by react native for IOS & Android. Doesn't apply to electron, Web targets
16 | module.exports = {
17 | presets: ['module:metro-react-native-babel-preset'],
18 | plugins: [
19 | ['transform-define', configVars],
20 | [
21 | require.resolve('babel-plugin-module-resolver'),
22 | {
23 | root: ['./'],
24 | alias: {
25 | 'customization-api': './customization-api/index.ts',
26 | 'customization-implementation':
27 | './customization-implementation/index.ts',
28 | customization: getCustomizationApiPath(),
29 | },
30 | },
31 | ],
32 | 'react-native-reanimated/plugin'
33 | ],
34 | };
35 |
--------------------------------------------------------------------------------
/template/bridge/rtm/web/Types.ts:
--------------------------------------------------------------------------------
1 | export interface AttributesMap {
2 | [key: string]: string;
3 | }
4 |
5 | export interface ChannelAttributeOptions {
6 | /**
7 | * Indicates whether or not to notify all channel members of a channel attribute change
8 | * This flag is valid only within the current method call:
9 | * true: Notify all channel members of a channel attribute change.
10 | * false: (Default) Do not notify all channel members of a channel attribute change.
11 | */
12 | enableNotificationToChannelMembers?: undefined | false | true;
13 | }
14 |
--------------------------------------------------------------------------------
/template/configTransform.js:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | let jsonFile = require('./config.json');
13 | let PREFIX = '$config';
14 | let config = {};
15 | Object.keys(jsonFile).map(key => {
16 | config[`${PREFIX}.${key}`] = jsonFile[key];
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 |
33 | module.exports = config;
34 |
--------------------------------------------------------------------------------
/template/customization-api/action-library.ts:
--------------------------------------------------------------------------------
1 | //hooks used for create/join meeting
2 | export {default as useCreateRoom} from '../src/utils/useCreateRoom';
3 | export {default as useJoinRoom} from '../src/utils/useJoinRoom';
4 |
5 | //remove remote user from the call
6 | export {default as useRemoteEndcall} from '../src/utils/useRemoteEndCall';
7 | //switch camera
8 | export {default as useSwitchCamera} from '../src/utils/useSwitchCamera';
9 |
10 | export {controlMessageEnum} from '../src/components/ChatContext';
11 |
--------------------------------------------------------------------------------
/template/customization-api/atoms.ts:
--------------------------------------------------------------------------------
1 | export {default as UserAvatar} from '../src/atoms/UserAvatar';
2 | export {default as ImageIcon} from '../src/atoms/ImageIcon';
3 | export {default as Checkbox} from '../src/atoms/Checkbox';
4 | export {default as Spacer} from '../src/atoms/Spacer';
5 | export {default as LinkButton} from '../src/atoms/LinkButton';
6 | export {default as PrimaryButton} from '../src/atoms/PrimaryButton';
7 | export {default as TertiaryButton} from '../src/atoms/TertiaryButton';
8 | export {default as ActionMenu} from '../src/atoms/ActionMenu';
9 | export {default as IconButton} from '../src/atoms/IconButton';
10 | export {default as Dropdown} from '../src/atoms/Dropdown';
11 |
--------------------------------------------------------------------------------
/template/customization-api/customEvents.ts:
--------------------------------------------------------------------------------
1 | // 1. Import Events
2 | import Events from '../src/rtm-events-api/Events';
3 | import {
4 | EventSource,
5 | PersistanceLevel,
6 | EventCallback,
7 | } from '../src/rtm-events-api';
8 |
9 | // 2. Initialize with source "fpe"
10 | const customEvents = new Events(EventSource.fpe);
11 |
12 | // 3. export
13 | export {customEvents, PersistanceLevel};
14 | export type {EventCallback};
15 |
--------------------------------------------------------------------------------
/template/customization-api/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 |
13 | // TODO: Investigate further
14 | // Exported like so to prevent error while bundling as react-sdk. Cause: some webpack Edgecase
15 | import {customize} from './customize';
16 | import configJSON from '../config.json';
17 |
18 | let $config = configJSON as unknown as ConfigInterface;
19 |
20 | export {customize, $config};
21 | export * from './action-library';
22 | export * from './app-state';
23 | export * from './customEvents';
24 | export * from './sub-components';
25 | export * from './typeDefinition';
26 | export * from './utils';
27 | export * from './types';
28 | export * from './atoms';
29 |
30 | //TODO: hari remove later - used for simple-practice demo
31 | export * from './temp';
32 |
--------------------------------------------------------------------------------
/template/customization-implementation/dummyConfig.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | /**
13 | * Dummy Config used to load when project doesn't have the customization.
14 | */
15 | import {customize} from 'customization-api';
16 |
17 | const dummyConfig = customize({});
18 | export default dummyConfig;
19 |
--------------------------------------------------------------------------------
/template/customization-implementation/index.ts:
--------------------------------------------------------------------------------
1 | export {default as createHook, createConcealedHook} from './createHook';
2 | export {CustomizationProvider, useCustomization} from './useCustomization';
3 | export {default as customizationConfig} from 'customization';
4 |
--------------------------------------------------------------------------------
/template/customization.config.js:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 |
13 | /*
14 | getCustomizationApiPath - will return customization if exists otherwise it will return the dummy customization path
15 | */
16 | const fs = require('fs');
17 | const customizationPathTs = './customization/index.ts';
18 | const customizationPathTsx = './customization/index.tsx';
19 | const customizationDummyPath = './customization-implementation/dummyConfig.ts';
20 | const getCustomizationApiPath = () => {
21 | if (fs.existsSync(customizationPathTs)) {
22 | return customizationPathTs;
23 | }
24 | if (fs.existsSync(customizationPathTsx)) {
25 | return customizationPathTsx;
26 | }
27 | return customizationDummyPath;
28 | };
29 | module.exports = {getCustomizationApiPath, customizationDummyPath};
30 |
--------------------------------------------------------------------------------
/template/electron/entitlements.mac.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.cs.allow-jit
6 |
7 | com.apple.security.cs.allow-unsigned-executable-memory
8 |
9 | com.apple.security.cs.allow-dyld-environment-variables
10 |
11 | com.apple.security.device.camera
12 |
13 | com.apple.security.device.microphone
14 |
15 | com.apple.security.device.audio-input
16 |
17 |
18 |
--------------------------------------------------------------------------------
/template/electron/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 | <%= htmlWebpackPlugin.options.title %>
14 |
15 |
16 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/template/electron/renderer/index.js:
--------------------------------------------------------------------------------
1 | import Video from '../../src/App';
2 | import {AppRegistry} from 'react-native';
3 | import '../../src/assets/font-styles.css';
4 | // import React from 'react';
5 |
6 | // const Video = () => Hello
;
7 |
8 | AppRegistry.registerComponent('App', () => Video);
9 |
10 | AppRegistry.runApplication('App', {
11 | initialProps: {},
12 | rootTag: document.getElementById('react-app'),
13 | });
14 |
--------------------------------------------------------------------------------
/template/esbuildConfigTransform.js:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | export let config = require('./config.json');
13 |
--------------------------------------------------------------------------------
/template/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | /**
13 | * @format
14 | */
15 |
16 | import {AppRegistry} from 'react-native';
17 | import 'react-native-url-polyfill/auto';
18 | import App from './src/App';
19 | import {name as appName} from './app.json';
20 | import React from 'react';
21 | import {
22 | DatadogProvider,
23 | getConfig,
24 | } from './src/logger/transports/agora-transport';
25 | import {ENABLE_AGORA_LOGGER_TRANSPORT} from './src/logger/constants';
26 |
27 | if (ENABLE_AGORA_LOGGER_TRANSPORT) {
28 | const config = getConfig();
29 | const AppWithLogs = () => (
30 |
31 |
32 |
33 | );
34 | AppRegistry.registerComponent(appName, () => AppWithLogs);
35 | } else {
36 | AppRegistry.registerComponent(appName, () => App);
37 | }
38 |
--------------------------------------------------------------------------------
/template/index.rsdk.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | /**
13 | * @format
14 | */
15 | import SDKAppWrapper, {
16 | AppBuilderSdkApi,
17 | AppBuilderSdkApiInterface,
18 | } from './src/SDKAppWrapper';
19 | import React from 'react';
20 | import * as RN from 'react-native-web';
21 | import './src/assets/font-styles.css';
22 |
23 | export * from 'customization-api';
24 | export * from 'customization-implementation';
25 |
26 | interface AppBuilderReactSdkInterface extends AppBuilderSdkApiInterface {
27 | View: React.FC;
28 | }
29 |
30 | const AppBuilderReactSdkApi: AppBuilderReactSdkInterface = {
31 | ...AppBuilderSdkApi,
32 | View: SDKAppWrapper,
33 | };
34 |
35 | export {React, RN};
36 | export default AppBuilderReactSdkApi;
37 |
--------------------------------------------------------------------------------
/template/index.web.js:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import {AppRegistry} from 'react-native';
13 | import Video from './src/App';
14 | import './src/assets/font-styles.css';
15 |
16 | AppRegistry.registerComponent('App', () => Video);
17 |
18 | AppRegistry.runApplication('App', {
19 | initialProps: {},
20 | rootTag: document.getElementById('react-app'),
21 | });
22 |
--------------------------------------------------------------------------------
/template/index.wsdk.tsx:
--------------------------------------------------------------------------------
1 | import {AppRegistry} from 'react-native';
2 | import SDKAppWrapper, {
3 | AppBuilderSdkApi,
4 | AppBuilderSdkApiInterface,
5 | } from './src/SDKAppWrapper';
6 | import React from 'react';
7 | import * as RN from 'react-native-web';
8 | import './src/assets/font-styles.css';
9 | export * from 'customization-api';
10 | export * from 'customization-implementation';
11 |
12 | const AppBuilderWebSdkApi: AppBuilderSdkApiInterface = AppBuilderSdkApi;
13 |
14 | // init code
15 | class AppBuilder extends HTMLElement {
16 | connectedCallback() {
17 | this.style.height = '100%';
18 | this.style.width = '100%';
19 | this.style.display = 'flex';
20 | this.style.flex = '1';
21 | AppRegistry.registerComponent('App', () => SDKAppWrapper);
22 | AppRegistry.runApplication('App', {
23 | // initialProps: {passphrase: this.getAttribute('passphrase')},
24 | rootTag: this,
25 | });
26 | }
27 | }
28 |
29 | customElements.define('app-builder', AppBuilder);
30 |
31 | export {React, RN};
32 | export default AppBuilderWebSdkApi;
33 |
--------------------------------------------------------------------------------
/template/ios/.xcode.env:
--------------------------------------------------------------------------------
1 | # This `.xcode.env` file is versioned and is used to source the environment
2 | # used when running script phases inside Xcode.
3 | # To customize your local environment, you can create an `.xcode.env.local`
4 | # file that is not versioned.
5 |
6 | # NODE_BINARY variable contains the PATH to the node executable.
7 | #
8 | # Customize the NODE_BINARY variable here.
9 | # For example, to use nvm with brew, add the following line
10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use
11 | export NODE_BINARY=$(command -v node)
12 |
--------------------------------------------------------------------------------
/template/ios/File.swift:
--------------------------------------------------------------------------------
1 | //
2 | // File.swift
3 | // HelloWorld
4 | //
5 |
6 | import Foundation
7 |
--------------------------------------------------------------------------------
/template/ios/HelloWorld-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
5 |
--------------------------------------------------------------------------------
/template/ios/HelloWorld-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/template/ios/HelloWorld.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/template/ios/HelloWorld.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/template/ios/HelloWorld.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/template/ios/HelloWorld.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/template/ios/HelloWorld/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : RCTAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/template/ios/HelloWorld/HelloWorld.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.developer.associated-domains
6 |
7 | applinks:FRONTEND_ENDPOINT_BASE
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/template/ios/HelloWorld/HelloWorldDebug.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.developer.associated-domains
6 |
7 | applinks:FRONTEND_ENDPOINT_BASE
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/template/ios/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ios-marketing",
45 | "scale" : "1x",
46 | "size" : "1024x1024"
47 | }
48 | ],
49 | "info" : {
50 | "author" : "xcode",
51 | "version" : 1
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/template/ios/HelloWorld/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/template/ios/HelloWorld/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | @autoreleasepool {
8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/template/ios/HelloWorldTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | $(MARKETING_VERSION)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 |
24 |
25 |
--------------------------------------------------------------------------------
/template/ios/ScreenSharing/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSExtension
6 |
7 | NSExtensionPointIdentifier
8 | com.apple.broadcast-services-upload
9 | NSExtensionPrincipalClass
10 | AgoraReplayKitHandler
11 | RPBroadcastProcessMode
12 | RPBroadcastProcessModeSampleBuffer
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/template/ios/ScreenSharing/SampleHandler.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface SampleHandler : RPBroadcastSampleHandler
4 |
5 | @end
--------------------------------------------------------------------------------
/template/ios/ScreenSharing/SampleHandler.m:
--------------------------------------------------------------------------------
1 | #import "SampleHandler.h"
2 |
3 | @implementation SampleHandler
4 |
5 | - (void)broadcastStartedWithSetupInfo:(NSDictionary *)setupInfo {
6 | // User has requested to start the broadcast. Setup info from the UI extension can be supplied but optional.
7 | }
8 |
9 | - (void)broadcastPaused {
10 | // User has requested to pause the broadcast. Samples will stop being delivered.
11 | }
12 |
13 | - (void)broadcastResumed {
14 | // User has requested to resume the broadcast. Samples delivery will resume.
15 | }
16 |
17 | - (void)broadcastFinished {
18 | // User has requested to finish the broadcast.
19 | }
20 |
21 | - (void)processSampleBuffer:(CMSampleBufferRef)sampleBuffer withType:(RPSampleBufferType)sampleBufferType {
22 |
23 | switch (sampleBufferType) {
24 | case RPSampleBufferTypeVideo:
25 | // Handle video sample buffer
26 | break;
27 | case RPSampleBufferTypeAudioApp:
28 | // Handle audio sample buffer for app audio
29 | break;
30 | case RPSampleBufferTypeAudioMic:
31 | // Handle audio sample buffer for mic audio
32 | break;
33 |
34 | default:
35 | break;
36 | }
37 | }
38 |
39 | @end
--------------------------------------------------------------------------------
/template/ios/link-assets-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "migIndex": 1,
3 | "data": [
4 | {
5 | "path": "src/assets/fonts/SourceSansPro-Regular.ttf",
6 | "sha1": "48d6928e08ba5e2ca1e15d754c146580b1c8febd"
7 | },
8 | {
9 | "path": "src/assets/fonts/icomoon.ttf",
10 | "sha1": "f08065b544237fb6aa60f7a4699a3ef1d7d1abf5"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/template/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: 'react-native',
3 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
4 | };
5 |
--------------------------------------------------------------------------------
/template/licencing.txt:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 |
--------------------------------------------------------------------------------
/template/metro.config.js:
--------------------------------------------------------------------------------
1 | const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
2 |
3 | /**
4 | * Metro configuration
5 | * https://facebook.github.io/metro/docs/configuration
6 | *
7 | * @type {import('metro-config').MetroConfig}
8 | */
9 | const config = {};
10 |
11 | module.exports = mergeConfig(getDefaultConfig(__dirname), config);
12 |
--------------------------------------------------------------------------------
/template/nativeDeps.js:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | const os = require('os');
13 |
14 | module.exports.default = [];
15 | // os.platform() !== 'linux' ? 'agora-electron-sdk' : false,
16 | // ].filter(Boolean);
17 |
--------------------------------------------------------------------------------
/template/notarize.js:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | const {notarize} = require('electron-notarize');
13 | const {PRODUCT_ID} = require('./config.json');
14 |
15 | exports.default = async function notarizing(context) {
16 | const {electronPlatformName, appOutDir} = context;
17 | if (!Boolean(process.env.APPLE_ID)){
18 | return;
19 | }
20 | if (electronPlatformName !== 'darwin') {
21 | return;
22 | }
23 |
24 | const appName = context.packager.appInfo.productFilename;
25 |
26 | return await notarize({
27 | appBundleId: `com.${PRODUCT_ID.toLowerCase()}`,
28 | appPath: `${appOutDir}/${appName}.app`,
29 | appleId: process.env.APPLE_ID,
30 | appleIdPassword: '@keychain:AC_PASSWORD',
31 | });
32 | };
33 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: ['backpacker-react'],
3 | rules: {
4 | 'import/no-extraneous-dependencies': 'off',
5 | 'react/sort-comp': 'off',
6 | 'no-underscore-dangle': 'warn'
7 | }
8 | };
9 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .git
3 | node_modules
4 | .idea
5 | coverage
6 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/.npmignore:
--------------------------------------------------------------------------------
1 | __tests__
2 | coverage
3 | .eslintrc.js
4 | .prettierrc.js
5 | success-toast.gif
6 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | trailingComma: 'none',
3 | tabWidth: 2,
4 | singleQuote: true,
5 | jsxSingleQuote: true,
6 | jsxBracketSameLine: true,
7 | arrowParens: 'always'
8 | };
9 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Calin Tamas
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset']
3 | };
4 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/index.js:
--------------------------------------------------------------------------------
1 | import Toast from './src';
2 |
3 | export { default as BaseToast } from './src/components/base';
4 | export default Toast;
5 |
6 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: 'react-native',
3 | setupFiles: ['./jest.setup.js'],
4 | setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect']
5 | };
6 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/jest.setup.js:
--------------------------------------------------------------------------------
1 | /* eslint-env jest */
2 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-toast-message",
3 | "version": "1.4.9",
4 | "description": "Toast message component for React Native",
5 | "main": "index.js",
6 | "scripts": {
7 | "hooks:install": "node ./node_modules/husky/bin/install",
8 | "lint": "./node_modules/.bin/eslint . --ext=jsx --ext=js",
9 | "lint-staged": "./node_modules/.bin/lint-staged",
10 | "prettier": "./node_modules/.bin/prettier . --write",
11 | "test": "./node_modules/.bin/jest"
12 | },
13 | "lint-staged": {
14 | "**/*.js": [
15 | "prettier --write",
16 | "eslint"
17 | ]
18 | },
19 | "husky": {
20 | "hooks": {
21 | "pre-commit": "lint-staged"
22 | }
23 | },
24 | "keywords": [
25 | "react-native",
26 | "toast"
27 | ],
28 | "author": "Calin Tamas ",
29 | "license": "MIT",
30 | "repository": {
31 | "type": "git",
32 | "url": "git+https://github.com/calintamas/react-native-toast-message.git"
33 | },
34 | "devDependencies": {
35 | "@testing-library/jest-native": "^4.0.1",
36 | "@testing-library/react-native": "^7.1.0",
37 | "@types/jest": "^26.0.20",
38 | "eslint-config-backpacker-react": "^0.3.0",
39 | "husky": "^3.1.0",
40 | "jest": "^26.6.3",
41 | "lint-staged": "^10.2.2",
42 | "metro-react-native-babel-preset": "^0.66.0",
43 | "prettier": "2.2.1",
44 | "react-test-renderer": "^17.0.1"
45 | },
46 | "dependencies": {
47 | "prop-types": "^15.7.2"
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/assets/icons/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/react-native-toast-message/src/assets/icons/close.png
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/assets/icons/close@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/react-native-toast-message/src/assets/icons/close@2x.png
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/assets/icons/close@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/react-native-toast-message/src/assets/icons/close@3x.png
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/assets/icons/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/react-native-toast-message/src/assets/icons/error.png
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/assets/icons/error@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/react-native-toast-message/src/assets/icons/error@2x.png
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/assets/icons/error@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/react-native-toast-message/src/assets/icons/error@3x.png
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/assets/icons/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/react-native-toast-message/src/assets/icons/info.png
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/assets/icons/info@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/react-native-toast-message/src/assets/icons/info@2x.png
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/assets/icons/info@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/react-native-toast-message/src/assets/icons/info@3x.png
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/assets/icons/success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/react-native-toast-message/src/assets/icons/success.png
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/assets/icons/success@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/react-native-toast-message/src/assets/icons/success@2x.png
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/assets/icons/success@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/react-native-toast-message/src/assets/icons/success@3x.png
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/assets/index.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable global-require */
2 |
3 | const assets = {
4 | icons: {
5 | success: require('./icons/success.png'),
6 | error: require('./icons/error.png'),
7 | info: require('./icons/info.png'),
8 | close: require('./icons/close.png')
9 | }
10 | };
11 |
12 | const { icons } = assets;
13 |
14 | export { icons };
15 | export default assets;
16 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/colors/index.js:
--------------------------------------------------------------------------------
1 | const colors = {
2 | white: '#FFF',
3 | blazeOrange: '#FF414D',
4 | mantis: '#69C779',
5 | alto: '#D8D8D8',
6 | dustyGray: '#979797',
7 | lightSkyBlue: '#87CEFA',
8 | black: '#040405'
9 | };
10 |
11 | export default colors;
12 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/components/__tests__/ErrorToast.test.js:
--------------------------------------------------------------------------------
1 | /* eslint-env jest */
2 |
3 | import { render } from '@testing-library/react-native';
4 | import React from 'react';
5 |
6 | import colors from '../../colors';
7 | import { icons } from '../../assets';
8 | import ErrorToast from '../error';
9 |
10 | describe('test ErrorToast component', () => {
11 | it('renders style correctly', () => {
12 | const { queryByTestId } = render();
13 | const rootView = queryByTestId('rootView');
14 | const leadingIcon = queryByTestId('leadingIcon');
15 |
16 | expect(rootView).toHaveStyle({
17 | borderLeftColor: colors.blazeOrange
18 | });
19 | expect(leadingIcon.children[0].props.source).toBe(icons.error);
20 | });
21 | });
22 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/components/__tests__/Icon.test.js:
--------------------------------------------------------------------------------
1 | /* eslint-env jest */
2 |
3 | import { render } from '@testing-library/react-native';
4 | import React from 'react';
5 |
6 | import Icon from '../icon';
7 |
8 | describe('test Icon component', () => {
9 | it('does not render anything', () => {
10 | const { queryByTestId } = render();
11 | const icon = queryByTestId('icon');
12 | expect(icon).toBeFalsy();
13 | });
14 |
15 | it('renders an icon', () => {
16 | const mockIcon = { uri: 'mock' };
17 | const { queryByTestId } = render();
18 | const icon = queryByTestId('icon');
19 | expect(icon.props.source).toBe(mockIcon);
20 | });
21 | });
22 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/components/__tests__/InfoToast.test.js:
--------------------------------------------------------------------------------
1 | /* eslint-env jest */
2 |
3 | import { render } from '@testing-library/react-native';
4 | import React from 'react';
5 |
6 | import colors from '../../colors';
7 | import { icons } from '../../assets';
8 | import InfoToast from '../info';
9 |
10 | describe('test InfoToast component', () => {
11 | it('renders style correctly', () => {
12 | const { queryByTestId } = render();
13 | const rootView = queryByTestId('rootView');
14 | const leadingIcon = queryByTestId('leadingIcon');
15 |
16 | expect(rootView).toHaveStyle({
17 | borderLeftColor: colors.lightSkyBlue
18 | });
19 | expect(leadingIcon.children[0].props.source).toBe(icons.info);
20 | });
21 | });
22 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/components/__tests__/SuccessToast.test.js:
--------------------------------------------------------------------------------
1 | /* eslint-env jest */
2 |
3 | import { render } from '@testing-library/react-native';
4 | import React from 'react';
5 |
6 | import colors from '../../colors';
7 | import { icons } from '../../assets';
8 | import SuccessToast from '../success';
9 |
10 | describe('test SuccessToast component', () => {
11 | it('renders style correctly', () => {
12 | const { queryByTestId } = render();
13 | const rootView = queryByTestId('rootView');
14 | const leadingIcon = queryByTestId('leadingIcon');
15 |
16 | expect(rootView).toHaveStyle({
17 | borderLeftColor: colors.mantis
18 | });
19 | expect(leadingIcon.children[0].props.source).toBe(icons.success);
20 | });
21 | });
22 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/components/base/styles.js:
--------------------------------------------------------------------------------
1 | import { StyleSheet, Platform } from 'react-native';
2 |
3 | export default StyleSheet.create({
4 | base: {
5 | flexDirection: 'row',
6 | borderRadius: 4,
7 | borderTopWidth: 4,
8 | backgroundColor: $config.CARD_LAYER_4_COLOR,
9 | width: '100%',
10 | paddingHorizontal: Platform.OS === 'android' ? 16 : 24,
11 | paddingVertical: 16,
12 | height: 'auto',
13 | shadowOffset: { width: 0, height: 0 },
14 | shadowOpacity: 0.1,
15 | shadowRadius: 6,
16 | elevation: 2
17 | },
18 | contentContainer: {
19 | flex: 1,
20 | overflow: 'hidden',
21 | flexDirection: 'column',
22 | justifyContent: 'flex-start'
23 | },
24 | text1: {
25 | fontSize: 14,
26 | lineHeight: 22,
27 | fontFamily: 'Source Sans Pro',
28 | fontWeight: '700'
29 | },
30 | text2: {
31 | marginTop: 4,
32 | fontSize: 14,
33 | lineHeight: 22,
34 | fontWeight: '400',
35 | fontFamily: 'Source Sans Pro'
36 | }
37 | });
38 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/components/error.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | import BaseToast from './base';
4 | import { icons } from '../assets';
5 | import colors from '../colors';
6 |
7 | function ErrorToast(props) {
8 | return (
9 |
15 | );
16 | }
17 |
18 | ErrorToast.propTypes = BaseToast.propTypes;
19 |
20 | export default ErrorToast;
21 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/components/icon/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Image } from 'react-native';
3 | import PropTypes from 'prop-types';
4 |
5 | import { stylePropType } from '../../utils/prop-types';
6 | import styles from './styles';
7 |
8 | function Icon({ source, style }) {
9 | if (!source) {
10 | return null;
11 | }
12 |
13 | return (
14 |
20 | );
21 | }
22 |
23 | const imageSourcePropType = PropTypes.oneOfType([
24 | PropTypes.number,
25 | PropTypes.shape({
26 | uri: PropTypes.string
27 | })
28 | ]);
29 |
30 | Icon.propTypes = {
31 | source: imageSourcePropType,
32 | style: stylePropType
33 | };
34 |
35 | Icon.defaultProps = {
36 | source: undefined,
37 | style: undefined
38 | };
39 |
40 | export default Icon;
41 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/components/icon/styles.js:
--------------------------------------------------------------------------------
1 | import { StyleSheet } from 'react-native';
2 |
3 | export default StyleSheet.create({
4 | base: {
5 | height: 16,
6 | width: 16
7 | }
8 | });
9 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/components/info.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | import BaseToast from './base';
4 | import { icons } from '../assets';
5 | import colors from '../colors';
6 |
7 | function InfoToast(props) {
8 | return (
9 |
15 | );
16 | }
17 |
18 | InfoToast.propTypes = BaseToast.propTypes;
19 |
20 | export default InfoToast;
21 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/components/success.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | import BaseToast from './base';
4 | import { icons } from '../assets';
5 | import colors from '../colors';
6 |
7 | function SuccessToast(props) {
8 | return (
9 |
15 | );
16 | }
17 |
18 | SuccessToast.propTypes = BaseToast.propTypes;
19 |
20 | export default SuccessToast;
21 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/styles.js:
--------------------------------------------------------------------------------
1 | import isMobileOrTablet from '../../src/utils/isMobileOrTablet';
2 | import { StyleSheet, Dimensions } from 'react-native';
3 |
4 | export default StyleSheet.create({
5 | base: {
6 | position: 'absolute',
7 | alignItems: 'center',
8 | justifyContent: 'center'
9 | },
10 | top: {
11 | top: 0
12 | },
13 | bottom: {
14 | bottom: 0
15 | }
16 | });
17 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/styles.sdk.ts:
--------------------------------------------------------------------------------
1 | import isMobileOrTablet from '../../src/utils/isMobileOrTablet';
2 | import { Dimensions, StyleSheet } from 'react-native';
3 |
4 | export default StyleSheet.create({
5 | base: {
6 | position: 'absolute',
7 | alignItems: 'center',
8 | justifyContent: 'center'
9 | },
10 | top: {
11 | top: 30
12 | },
13 | bottom: {
14 | bottom: 0
15 | }
16 | });
17 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/utils/arr.js:
--------------------------------------------------------------------------------
1 | const complement = (arr) => arr.map((i) => -i);
2 |
3 | export { complement };
4 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/utils/obj.js:
--------------------------------------------------------------------------------
1 | const includeKeys = ({ obj = {}, keys = [] }) =>
2 | Object.keys(obj).reduce((acc, key) => {
3 | if (keys.includes(key)) {
4 | acc[key] = obj[key];
5 | }
6 | return acc;
7 | }, {});
8 |
9 | export { includeKeys };
10 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/utils/platform.js:
--------------------------------------------------------------------------------
1 | import { Platform } from 'react-native';
2 |
3 | const isIOS = Platform.OS === 'ios';
4 |
5 | export { isIOS };
6 |
--------------------------------------------------------------------------------
/template/react-native-toast-message/src/utils/prop-types.js:
--------------------------------------------------------------------------------
1 | import PropTypes from 'prop-types';
2 |
3 | const stylePropType = PropTypes.oneOfType([PropTypes.object, PropTypes.number]);
4 |
5 | export { stylePropType };
6 |
--------------------------------------------------------------------------------
/template/react-native.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | project: {
3 | ios: {},
4 | android: {},
5 | },
6 | assets: ["./src/assets/fonts"]
7 | }
--------------------------------------------------------------------------------
/template/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/.DS_Store
--------------------------------------------------------------------------------
/template/src/ai-agent/ai-interface/1.Not-Joined.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/ai-agent/ai-interface/1.Not-Joined.mp4
--------------------------------------------------------------------------------
/template/src/ai-agent/ai-interface/2.Joining.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/ai-agent/ai-interface/2.Joining.mp4
--------------------------------------------------------------------------------
/template/src/ai-agent/ai-interface/3.Ambient.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/ai-agent/ai-interface/3.Ambient.mp4
--------------------------------------------------------------------------------
/template/src/ai-agent/ai-interface/4.Listening.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/ai-agent/ai-interface/4.Listening.mp4
--------------------------------------------------------------------------------
/template/src/ai-agent/ai-interface/5.Talking.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/ai-agent/ai-interface/5.Talking.mp4
--------------------------------------------------------------------------------
/template/src/ai-agent/ai-interface/6.Disconnected.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/ai-agent/ai-interface/6.Disconnected.mp4
--------------------------------------------------------------------------------
/template/src/ai-agent/assets/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/ai-agent/assets/close.png
--------------------------------------------------------------------------------
/template/src/ai-agent/assets/join-call.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/ai-agent/assets/join-call.png
--------------------------------------------------------------------------------
/template/src/ai-agent/assets/leave-call.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/ai-agent/assets/leave-call.png
--------------------------------------------------------------------------------
/template/src/ai-agent/assets/mic-off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/ai-agent/assets/mic-off.png
--------------------------------------------------------------------------------
/template/src/ai-agent/assets/mic-on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/ai-agent/assets/mic-on.png
--------------------------------------------------------------------------------
/template/src/ai-agent/assets/settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/ai-agent/assets/settings.png
--------------------------------------------------------------------------------
/template/src/ai-agent/assets/transcript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/ai-agent/assets/transcript.png
--------------------------------------------------------------------------------
/template/src/ai-agent/components/CustomChatPanel.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, View} from 'react-native';
2 | import React from 'react';
3 | import ChatScreen from './agent-chat-panel/agent-chat-ui';
4 |
5 | const CustomSidePanel = () => {
6 | return (
7 |
8 |
9 |
10 | );
11 | };
12 |
13 | export default CustomSidePanel;
14 |
15 | const styles = StyleSheet.create({
16 | container: {
17 | flex: 1,
18 | display: 'flex',
19 | height: '100%',
20 | },
21 | });
22 |
--------------------------------------------------------------------------------
/template/src/ai-agent/components/mobile/Topbar.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {View, StyleSheet, Text} from 'react-native';
3 | import {useRoomInfo} from 'customization-api';
4 | import ThemeConfig from '../../../theme';
5 | import {SettingButton} from '../ControlButtons';
6 | import {getAILayoutType} from '../../utils';
7 |
8 | const MobileTopbar = () => {
9 | const {
10 | data: {meetingTitle},
11 | } = useRoomInfo();
12 |
13 | return (
14 |
15 |
16 | {meetingTitle}
17 |
18 | {getAILayoutType() !== 'LAYOUT_TYPE_2' ? (
19 |
20 |
21 |
22 | ) : (
23 | <>>
24 | )}
25 |
26 | );
27 | };
28 |
29 | const style = StyleSheet.create({
30 | rootStyle: {
31 | display: 'flex',
32 | flexDirection: 'row',
33 | justifyContent: 'space-between',
34 | alignItems: 'center',
35 | padding: 14,
36 | },
37 | containerStyle: {
38 | display: 'flex',
39 | flexDirection: 'row',
40 | justifyContent: 'center',
41 | alignItems: 'center',
42 | alignSelf: 'stretch',
43 | },
44 | textStyle: {
45 | color: $config.FONT_COLOR,
46 | textAlign: 'center',
47 | fontFamily: ThemeConfig.FontFamily.sansPro,
48 | fontSize: 16,
49 | fontStyle: 'normal',
50 | fontWeight: '600',
51 | lineHeight: 20,
52 | },
53 | });
54 |
55 | export default MobileTopbar;
56 |
--------------------------------------------------------------------------------
/template/src/ai-agent/components/react-audio-visualize/LiveAudioVisualizer/index.ts:
--------------------------------------------------------------------------------
1 | export {LiveAudioVisualizer} from './LiveAudioVisualizer';
2 |
--------------------------------------------------------------------------------
/template/src/ai-agent/components/react-audio-visualize/index.ts:
--------------------------------------------------------------------------------
1 | export {LiveAudioVisualizer} from './LiveAudioVisualizer';
2 |
--------------------------------------------------------------------------------
/template/src/ai-agent/components/utils.ts:
--------------------------------------------------------------------------------
1 | import {useEffect, useState} from 'react';
2 | import {
3 | AGENT_PROXY_URL,
4 | AGORA_SSO_LOGIN_PATH,
5 | AGORA_SSO_CLIENT_ID,
6 | AGORA_SSO_BASE,
7 | } from '../components/AgentControls/const';
8 | import {useRoomInfo} from 'customization-api';
9 |
10 | export const handleSSOLogin = () => {
11 | const REDIRECT_URL = `${AGENT_PROXY_URL}/login`;
12 | const originURL = window.location.origin + '/validate';
13 |
14 | const ssoUrl = `${AGORA_SSO_BASE}/${AGORA_SSO_LOGIN_PATH}?scope=basic_info&response_type=code&state=url=${originURL}&redirect_uri=${REDIRECT_URL}&client_id=${AGORA_SSO_CLIENT_ID}`;
15 | console.log('sso', ssoUrl);
16 | window.location.href = ssoUrl;
17 | };
18 |
19 | export const useIsAgentAvailable = () => {
20 | const [isAgentAvailable, setIsAgentAvailable] = useState(false);
21 | const {
22 | data: {agents},
23 | } = useRoomInfo();
24 |
25 | useEffect(() => {
26 | setIsAgentAvailable(
27 | agents?.filter(a => a.is_active === true)?.length ? true : false,
28 | );
29 | }, [agents]);
30 |
31 | return isAgentAvailable;
32 | };
33 |
--------------------------------------------------------------------------------
/template/src/ai-agent/routes/CustomLoginRoute.tsx:
--------------------------------------------------------------------------------
1 | import React, {useEffect} from 'react';
2 | import {Loading} from 'customization-api';
3 | import {
4 | AGENT_PROXY_URL,
5 | AGORA_SSO_BASE,
6 | AGORA_SSO_LOGIN_PATH,
7 | AGORA_SSO_CLIENT_ID,
8 | } from '../components/AgentControls/const';
9 |
10 | export default function CustomLoginRoute() {
11 | const handleSSOLogin = () => {
12 | const REDIRECT_URL = `${AGENT_PROXY_URL}/login`;
13 | const originURL = window.location.origin + '/validate';
14 |
15 | const ssoUrl = `${AGORA_SSO_BASE}/${AGORA_SSO_LOGIN_PATH}?scope=basic_info&response_type=code&state=url=${originURL}&redirect_uri=${REDIRECT_URL}&client_id=${AGORA_SSO_CLIENT_ID}`;
16 | console.log('sso', ssoUrl);
17 | window.location.href = ssoUrl;
18 | };
19 |
20 | useEffect(() => {
21 | handleSSOLogin();
22 | }, []);
23 |
24 | return ;
25 | }
26 |
--------------------------------------------------------------------------------
/template/src/ai-agent/routes/CustomValidateRoute.tsx:
--------------------------------------------------------------------------------
1 | import React, {useContext, useEffect} from 'react';
2 | import {useHistory, Loading} from 'customization-api';
3 | import {AgentContext} from '../components/AgentControls/AgentContext';
4 |
5 | const CustomValidateRoute = () => {
6 | const history = useHistory();
7 | const {setAgentAuthToken} = useContext(AgentContext);
8 |
9 | useEffect(() => {
10 | const queryParams = new URLSearchParams(window.location.search);
11 | queryParams.forEach((value, key) => {
12 | console.log(`${key}: ${value}`);
13 | });
14 | // check for success login from url param and redirect to create using custom param
15 |
16 | if (queryParams.has('token')) {
17 | // Redirect to create using custom param only if token exists
18 | setAgentAuthToken(queryParams.get('token') || '');
19 | history.push('/create?auth=success');
20 | }
21 | }, []);
22 | return ;
23 | };
24 |
25 | export default CustomValidateRoute;
26 |
--------------------------------------------------------------------------------
/template/src/app-state/useBeautyEffects.ts:
--------------------------------------------------------------------------------
1 | import {type BeautyEffects} from 'customization-api';
2 | import {
3 | useBeautyEffect,
4 | type BeautyProcessorType,
5 | } from '../components/beauty-effect/useBeautyEffects';
6 |
7 | export interface BeautyEffectInterface {
8 | applyBeautyEffect: (config: BeautyEffects) => void;
9 | removeBeautyEffect: () => void;
10 | beautyProcessor: BeautyProcessorType;
11 | }
12 |
13 | export const useBeautyEffects: () => BeautyEffectInterface = () => {
14 | const {applyBeautyEffect, removeBeautyEffect, beautyProcessor} =
15 | useBeautyEffect();
16 |
17 | // const beautyEffects = {
18 | // lighteningContrastLevel,
19 | // lighteningLevel,
20 | // smoothnessLevel,
21 | // sharpnessLevel,
22 | // rednessLevel,
23 | // };
24 |
25 | return {
26 | applyBeautyEffect,
27 | removeBeautyEffect,
28 | beautyProcessor,
29 | };
30 | };
31 |
--------------------------------------------------------------------------------
/template/src/app-state/useLocalUserInfo.ts:
--------------------------------------------------------------------------------
1 | import {useLocalUid} from '../../agora-rn-uikit';
2 | import {useContent} from 'customization-api';
3 |
4 | /**
5 | * The LocalUserInfo app state contains the local user information like uid, audio and video mute states etc.
6 | */
7 | export const useLocalUserInfo = () => {
8 | const localUid = useLocalUid();
9 | const {defaultContent} = useContent();
10 | return defaultContent[localUid];
11 | };
12 |
--------------------------------------------------------------------------------
/template/src/assets/apple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/assets/apple.png
--------------------------------------------------------------------------------
/template/src/assets/fonts/SourceSansPro-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/assets/fonts/SourceSansPro-Regular.ttf
--------------------------------------------------------------------------------
/template/src/assets/fonts/icomoon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/assets/fonts/icomoon.ttf
--------------------------------------------------------------------------------
/template/src/assets/google.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/assets/google.png
--------------------------------------------------------------------------------
/template/src/assets/microsoft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/assets/microsoft.png
--------------------------------------------------------------------------------
/template/src/assets/permission.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/assets/permission.png
--------------------------------------------------------------------------------
/template/src/assets/slack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/assets/slack.png
--------------------------------------------------------------------------------
/template/src/atoms/Avatar.tsx:
--------------------------------------------------------------------------------
1 | import {Text, View} from 'react-native';
2 | import React from 'react';
3 | import ThemeConfig from '../theme';
4 | import {isWeb} from '../utils/common';
5 |
6 | const Avatar = ({name, containerStyle, textStyle}) => {
7 | return (
8 |
17 |
18 |
27 | {name}
28 |
29 |
30 |
31 | );
32 | };
33 |
34 | const PlatformWrapper = ({children}) => {
35 | return isWeb() ? (
36 |
44 | {children}
45 |
46 | ) : (
47 | <>{children}>
48 | );
49 | };
50 |
51 | export default Avatar;
52 |
--------------------------------------------------------------------------------
/template/src/atoms/HorizontalRule.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React from 'react';
13 | import {StyleSheet, View, ViewProps} from 'react-native';
14 | import hexadecimalTransparency from '../utils/hexadecimalTransparency';
15 |
16 | export default function HorizontalRule(props: ViewProps) {
17 | return ;
18 | }
19 |
20 | const styles = StyleSheet.create({
21 | ruler: {
22 | borderBottomColor:
23 | $config.PRIMARY_ACTION_BRAND_COLOR + hexadecimalTransparency['80%'],
24 | borderBottomWidth: 1,
25 | margin: '2%',
26 | width: '100%',
27 | maxWidth: 200,
28 | },
29 | });
30 |
--------------------------------------------------------------------------------
/template/src/atoms/LinkButton.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, TouchableOpacity, TextStyle} from 'react-native';
2 | import React from 'react';
3 | import ThemeConfig from '../theme';
4 |
5 | interface LinkButtonProps {
6 | onPress: () => void;
7 | text: string;
8 | textStyle?: TextStyle;
9 | }
10 |
11 | const LinkButton = ({onPress, text, textStyle = {}}: LinkButtonProps) => {
12 | return (
13 |
14 | {text}
15 |
16 | );
17 | };
18 |
19 | export default LinkButton;
20 |
21 | const styles = StyleSheet.create({
22 | text: {
23 | color: $config.PRIMARY_ACTION_BRAND_COLOR,
24 | fontWeight: '600',
25 | fontFamily: ThemeConfig.FontFamily.sansPro,
26 | fontSize: ThemeConfig.FontSize.normal,
27 | lineHeight: ThemeConfig.FontSize.normal,
28 | },
29 | });
30 |
--------------------------------------------------------------------------------
/template/src/atoms/RecordingInfo.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, View} from 'react-native';
2 | import hexadecimalTransparency from '../utils/hexadecimalTransparency';
3 | import React from 'react';
4 | import {isMobileUA} from '../utils/common';
5 | import IconButton from '../atoms/IconButton';
6 |
7 | const RecordingInfo = ({recordingLabel = ''}) => {
8 | return (
9 |
10 |
34 |
35 | );
36 | };
37 |
38 | export default RecordingInfo;
39 |
40 | const styles = StyleSheet.create({
41 | recordingView: {
42 | flexDirection: 'row',
43 | alignItems: 'center',
44 | alignContent: 'center',
45 | justifyContent: 'center',
46 | },
47 | });
48 |
--------------------------------------------------------------------------------
/template/src/atoms/Spacer.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, View} from 'react-native';
2 | import React from 'react';
3 |
4 | interface SpacerProps {
5 | size: number | string;
6 | horizontal?: boolean;
7 | }
8 |
9 | const Spacer = ({size, horizontal = false}: SpacerProps) => {
10 | return (
11 |
18 | );
19 | };
20 |
21 | export default Spacer;
22 |
23 | const styles = StyleSheet.create({});
24 |
--------------------------------------------------------------------------------
/template/src/atoms/ToolbarMenu.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {View, StyleSheet, ViewStyle} from 'react-native';
3 | import {ToolbarMenuProvider} from '../utils/useMenu';
4 |
5 | export interface ToolbarMenuProps {
6 | children: React.ReactNode;
7 | containerStyle?: ViewStyle;
8 | }
9 | const ToolbarMenu = (props: ToolbarMenuProps) => {
10 | const {children, containerStyle} = props;
11 | if (!children) {
12 | return null;
13 | }
14 | return (
15 |
16 |
17 | {children}
18 |
19 |
20 | );
21 | };
22 | export default ToolbarMenu;
23 |
24 | const ToolbarMenuStyle = StyleSheet.create({
25 | containerStyle: {
26 | flex: 1,
27 | justifyContent: 'flex-start',
28 | backgroundColor: $config.CARD_LAYER_4_COLOR,
29 | borderRadius: 4,
30 | shadowColor: '#000',
31 | shadowOffset: {
32 | width: 0,
33 | height: 4,
34 | },
35 | shadowOpacity: 0.1,
36 | shadowRadius: 8,
37 | zIndex: 1,
38 | elevation: 1,
39 | },
40 | });
41 |
--------------------------------------------------------------------------------
/template/src/atoms/UserAvatar.tsx:
--------------------------------------------------------------------------------
1 | import {StyleSheet, Text, View} from 'react-native';
2 | import React from 'react';
3 | import ThemeConfig from '../theme';
4 | import {isWeb} from '../utils/common';
5 |
6 | function getInitials(name: string) {
7 | if (name && name?.length) {
8 | return name[0].toUpperCase();
9 | }
10 | return 'U';
11 | }
12 |
13 | const UserAvatar = ({name, containerStyle, textStyle}) => {
14 | return (
15 |
24 |
25 |
34 | {getInitials(name)}
35 |
36 |
37 |
38 | );
39 | };
40 |
41 | const PlatformWrapper = ({children}) => {
42 | return isWeb() ? (
43 |
51 | {children}
52 |
53 | ) : (
54 | <>{children}>
55 | );
56 | };
57 |
58 | export default UserAvatar;
59 |
60 | const styles = StyleSheet.create({});
61 |
--------------------------------------------------------------------------------
/template/src/auth/IDPAuth.electron.tsx:
--------------------------------------------------------------------------------
1 | import React, {useEffect} from 'react';
2 | import {useAuth} from './AuthProvider';
3 | import {useHistory, useParams} from '../components/Router';
4 | import Loading from '../subComponents/Loading';
5 | import useTokenAuth from './useTokenAuth';
6 | import {useString} from '../utils/useString';
7 | import {authAuthorizingApplicationText} from '../language/default-labels/commonLabels';
8 | import {LogSource, logger} from '../logger/AppBuilderLogger';
9 |
10 | export const IDPAuth = () => {
11 | const {setIsAuthenticated} = useAuth();
12 | const {enableTokenAuth} = useTokenAuth();
13 | const history = useHistory();
14 | const {token}: {token: string} = useParams();
15 | const text = useString(authAuthorizingApplicationText)();
16 |
17 | useEffect(() => {
18 | if (token) {
19 | enableTokenAuth(token)
20 | .then(() => {
21 | setIsAuthenticated(true);
22 | history.push('/');
23 | })
24 | .catch(() => {
25 | setIsAuthenticated(false);
26 | logger.error(LogSource.Internals, 'AUTH', 'electron login failed');
27 | });
28 | }
29 | }, []);
30 |
31 | return ;
32 | };
33 |
--------------------------------------------------------------------------------
/template/src/auth/openIDPURL.electron.tsx:
--------------------------------------------------------------------------------
1 | import {getOriginURL, getPlatformId, AUTH_ENDPOINT_URL} from './config';
2 | import Toast from '../../react-native-toast-message';
3 |
4 | export const getIDPAuthLoginURL = () => {
5 | //redirect URL not require for electron
6 | return `${AUTH_ENDPOINT_URL}?project_id=${
7 | $config.PROJECT_ID
8 | }&origin_url=${getOriginURL()}&platform_id=${getPlatformId()}`;
9 | };
10 |
11 | export const addEventListenerForToken = (history, heading) => {
12 | window.addEventListener(
13 | 'message',
14 | ({data, origin}: {data: {token: string; msg: string}; origin: string}) => {
15 | if (data?.token) {
16 | history.push(`/authorize/${data.token}`);
17 | } else if (data?.msg && data?.msg === 'login_link_expired') {
18 | Toast.show({
19 | leadingIconName: 'alert',
20 | type: 'error',
21 | text1: heading ? heading : 'Your session has timed out, Retrying...',
22 | visibilityTime: 3000,
23 | });
24 | setTimeout(() => {
25 | //open auth login again
26 | window.open(getIDPAuthLoginURL(), 'modal');
27 | }, 3000);
28 | }
29 | },
30 | false,
31 | );
32 | };
33 |
34 | export const enableIDPAuth = async (history, heading) => {
35 | addEventListenerForToken(history, heading);
36 | //open the auth login in the popup
37 | window.open(getIDPAuthLoginURL(), 'modal');
38 | };
39 | export const exitApp = () => {};
40 |
--------------------------------------------------------------------------------
/template/src/auth/openIDPURL.tsx:
--------------------------------------------------------------------------------
1 | import {Linking} from 'react-native';
2 | import {
3 | getIDPAuthRedirectURL,
4 | getOriginURL,
5 | getPlatformId,
6 | AUTH_ENDPOINT_URL,
7 | } from './config';
8 |
9 | export const getIDPAuthLoginURL = (returnTo?: any) => {
10 | const finalRedirectURL = getIDPAuthRedirectURL() + returnTo;
11 | return `${AUTH_ENDPOINT_URL}?project_id=${
12 | $config.PROJECT_ID
13 | }&redirect_url=${finalRedirectURL}&origin_url=${getOriginURL()}&platform_id=${getPlatformId()}`;
14 | };
15 |
16 | export const enableIDPAuth = async (returnTo?: any, heading?: string) => {
17 | //react-native-web support 2nd argument
18 | Linking.openURL(getIDPAuthLoginURL(returnTo), '_self');
19 | };
20 |
21 | export const exitApp = () => {};
22 |
--------------------------------------------------------------------------------
/template/src/components/ColorConfigure.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React from 'react';
13 | import ColorContext from './ColorContext';
14 |
15 | const ColorConfigure = (props: {children: React.ReactNode}) => {
16 | const primaryColor = $config.PRIMARY_ACTION_BRAND_COLOR;
17 | return (
18 |
22 | {props.children}
23 |
24 | );
25 | };
26 |
27 | export default ColorConfigure;
28 |
--------------------------------------------------------------------------------
/template/src/components/ColorContext.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import {createContext} from 'react';
13 |
14 | interface ColorContext {
15 | primaryColor: any;
16 | }
17 |
18 | const ColorContext = createContext({} as unknown as ColorContext);
19 |
20 | export default ColorContext;
21 |
--------------------------------------------------------------------------------
/template/src/components/DeviceConfigure.native.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React from 'react';
13 | import KeepAwake from 'react-native-keep-awake';
14 | import {ClientRoleType} from '../../agora-rn-uikit';
15 |
16 | interface Props {
17 | userRole: ClientRoleType;
18 | }
19 | const DeviceConfigure: React.FC = (props: any) => {
20 | return (
21 | <>
22 | {props.children}
23 |
24 | >
25 | );
26 | };
27 |
28 | export default DeviceConfigure;
29 |
--------------------------------------------------------------------------------
/template/src/components/DeviceContext.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import {createContext} from 'react';
13 |
14 | interface DeviceContext {
15 | selectedCam: string;
16 | setSelectedCam: (cam: string) => Promise;
17 | selectedMic: string;
18 | setSelectedMic: (mic: string) => Promise;
19 | selectedSpeaker: string;
20 | setSelectedSpeaker: (speaker: string) => Promise;
21 | deviceList: MediaDeviceInfo[];
22 | setDeviceList: (devices: MediaDeviceInfo[]) => void;
23 | isChrome: boolean;
24 | }
25 |
26 | const DeviceContext = createContext({
27 | selectedCam: '',
28 | selectedMic: '',
29 | selectedSpeaker: '',
30 | deviceList: [],
31 | setSelectedCam: async () => {},
32 | setSelectedMic: async () => {},
33 | setSelectedSpeaker: async () => {},
34 | setDeviceList: () => {},
35 | isChrome: false,
36 | });
37 | export default DeviceContext;
38 |
--------------------------------------------------------------------------------
/template/src/components/ErrorBoundary.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {logger, LogSource} from '../logger/AppBuilderLogger';
3 |
4 | class ErrorBoundary extends React.Component<{fallback: JSX.Element}> {
5 | constructor(props) {
6 | super(props);
7 | this.state = {hasError: false};
8 | }
9 |
10 | static getDerivedStateFromError(error) {
11 | // Update state so the next render will show the fallback UI.
12 | return {hasError: true};
13 | }
14 |
15 | componentDidCatch(error, info) {
16 | logger.error(
17 | LogSource.Internals,
18 | 'VIDEO_CALL_ROOM',
19 | 'Application crashed',
20 | {
21 | errorMessage: error?.message,
22 | errorStack: info?.componentStack,
23 | },
24 | );
25 | }
26 |
27 | render() {
28 | if (this.state.hasError) {
29 | // You can render any custom fallback UI
30 | return this.props.fallback;
31 | }
32 |
33 | return this.props.children;
34 | }
35 | }
36 |
37 | export default ErrorBoundary;
38 |
--------------------------------------------------------------------------------
/template/src/components/ErrorBoundaryFallback.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {Text, View, StyleSheet, ScrollView} from 'react-native';
3 | import Card from '../atoms/Card';
4 | import ThemeConfig from '../theme';
5 |
6 | export const ErrorBoundaryFallback = () => {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 | An unexpected error occurred. Please try again.
14 |
15 |
16 |
17 |
18 |
19 | );
20 | };
21 |
22 | const style = StyleSheet.create({
23 | logoContainerStyle: {
24 | flexDirection: 'row',
25 | justifyContent: 'space-between',
26 | alignItems: 'center',
27 | },
28 | root: {
29 | flex: 1,
30 | },
31 | main: {
32 | flexGrow: 1,
33 | flexDirection: 'row',
34 | justifyContent: 'center',
35 | },
36 | text: {
37 | fontSize: ThemeConfig.FontSize.large,
38 | fontWeight: '400',
39 | lineHeight: ThemeConfig.FontSize.large,
40 | color: $config.FONT_COLOR,
41 | fontFamily: ThemeConfig.FontFamily.sansPro,
42 | opacity: ThemeConfig.EmphasisOpacity.high,
43 | },
44 | });
45 |
--------------------------------------------------------------------------------
/template/src/components/JoinPhrase.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React, {useContext} from 'react';
13 | import {useParams} from './Router';
14 | import SessionContext from './SessionContext';
15 |
16 | const JoinPhrase = () => {
17 | const {phrase} = useParams();
18 | const {joinSession} = useContext(SessionContext);
19 | joinSession({phrase});
20 | return <>>;
21 | };
22 |
23 | export default JoinPhrase;
24 |
--------------------------------------------------------------------------------
/template/src/components/Navigation.electron.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React from 'react';
13 |
14 | const Navigation = () => {
15 | return <>>;
16 | };
17 |
18 | export default Navigation;
19 |
--------------------------------------------------------------------------------
/template/src/components/Navigation.native.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React, {useEffect} from 'react';
13 | import {Linking} from 'react-native';
14 | import {useHistory} from './Router.native';
15 | import {BackButton} from './Router.native';
16 |
17 | const processUrl = (url: string): string => {
18 | return url
19 | .replace(`${$config.PRODUCT_ID.toLowerCase()}://my-host`, '')
20 | .replace($config.FRONTEND_ENDPOINT, '');
21 | };
22 |
23 | const Navigation = () => {
24 | //moved deeplink handling into AuthProvider
25 | return (
26 | <>
27 |
28 | >
29 | );
30 | };
31 |
32 | export default Navigation;
33 |
--------------------------------------------------------------------------------
/template/src/components/Navigation.sdk.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React, {useEffect, useContext} from 'react';
13 | import {SdkApiContext} from './SdkApiContext';
14 | import {useHistory} from './Router';
15 | import isSDK from '../utils/isSDK';
16 |
17 | const Navigation = () => {
18 | const {join: SdkJoinState} = useContext(SdkApiContext);
19 |
20 | const history = useHistory();
21 |
22 | useEffect(() => {
23 | if (isSDK() && SdkJoinState.initialized) {
24 | if (SdkJoinState.phrase) {
25 | history.push(`/${SdkJoinState.phrase}`);
26 | }
27 | }
28 | }, [SdkJoinState]);
29 | return <>>;
30 | };
31 |
32 | export default Navigation;
33 |
--------------------------------------------------------------------------------
/template/src/components/Navigation.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React from 'react';
13 |
14 | const Navigation = () => {
15 | return <>>;
16 | };
17 |
18 | export default Navigation;
19 |
--------------------------------------------------------------------------------
/template/src/components/PrivateRoute.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React, {useContext} from 'react';
13 | import {Route, Redirect} from './Router';
14 | import StorageContext from './StorageContext';
15 |
16 | import type {RouteProps} from 'react-router';
17 |
18 | interface PrivateRouteProps extends RouteProps {
19 | failureRedirectTo: string;
20 | redirectProps?: string;
21 | }
22 |
23 | const PrivateRoute: React.FC = (props) => {
24 | const {store} = useContext(StorageContext);
25 | return (
26 | <>
27 | {store.token === null ? (
28 |
29 | ) : (
30 | {props.children}
31 | )}
32 | >
33 | );
34 | };
35 |
36 | export default PrivateRoute;
37 |
--------------------------------------------------------------------------------
/template/src/components/Router.electron.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | export {
13 | MemoryRouter as Router,
14 | Switch,
15 | Route,
16 | Link,
17 | Redirect,
18 | useHistory,
19 | useParams,
20 | useLocation,
21 | Prompt,
22 | } from 'react-router-dom';
23 |
--------------------------------------------------------------------------------
/template/src/components/Router.native.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | export {
13 | NativeRouter as Router,
14 | Switch,
15 | Route,
16 | Link,
17 | Redirect,
18 | useHistory,
19 | useParams,
20 | BackButton,
21 | useLocation,
22 | Prompt,
23 | } from 'react-router-native';
24 |
--------------------------------------------------------------------------------
/template/src/components/Router.sdk.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | export {
13 | MemoryRouter as Router,
14 | Switch,
15 | Route,
16 | Link,
17 | Redirect,
18 | useHistory,
19 | useParams,
20 | useLocation,
21 | Prompt,
22 | } from 'react-router-dom';
23 |
--------------------------------------------------------------------------------
/template/src/components/Router.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | export {
13 | BrowserRouter as Router,
14 | Switch,
15 | Route,
16 | Link,
17 | Redirect,
18 | useHistory,
19 | useParams,
20 | useLocation,
21 | Prompt,
22 | } from 'react-router-dom';
23 |
--------------------------------------------------------------------------------
/template/src/components/ToastComponent.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Toast from '../../react-native-toast-message';
3 | import ToastConfig from '../subComponents/ToastConfig';
4 | import {useIsRecordingBot} from '../subComponents/recording/useIsRecordingBot';
5 |
6 | const ToastComponent = () => {
7 | const {isRecordingBot} = useIsRecordingBot();
8 |
9 | // if ($config.TOAST_NOTIFICATIONS) {
10 | // return Toast.setRef(ref)} config={ToastConfig} />;
11 | // } else return <>>;
12 | if (isRecordingBot) {
13 | return <>>;
14 | }
15 | return Toast.setRef(ref)} config={ToastConfig} />;
16 | };
17 | export default ToastComponent;
18 |
--------------------------------------------------------------------------------
/template/src/components/common/Logo.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 |
13 | import React from 'react';
14 | import {StyleSheet, Image} from 'react-native';
15 | import {useHasBrandLogo} from '../../utils/common';
16 | const Logo: React.FC = () => {
17 | const hasBrandLogo = useHasBrandLogo();
18 | const hasLogo = hasBrandLogo();
19 | if (!hasLogo) {
20 | return null;
21 | }
22 |
23 | return (
24 |
29 | );
30 | };
31 | export default Logo;
32 | const style = StyleSheet.create({
33 | logo: {
34 | width: 78,
35 | height: 26,
36 | },
37 | });
38 |
--------------------------------------------------------------------------------
/template/src/components/common/index.tsx:
--------------------------------------------------------------------------------
1 | import Logo from './Logo'
2 | import Error,{ErrorProvider,ErrorContext} from './Error'
3 | export{
4 | Logo,
5 | ErrorContext,
6 | ErrorProvider,
7 | Error
8 | }
--------------------------------------------------------------------------------
/template/src/components/controls/toolbar-items/ChatToolbarItem.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ToolbarItem, {ToolbarItemProps} from '../../../atoms/ToolbarItem';
3 | import {ChatIconButton} from '../../Navbar';
4 |
5 | export interface Props extends Omit, 'children'> {}
6 |
7 | export const ChatToolbarItem = (props: Props) => {
8 | return (
9 |
10 |
11 |
12 | );
13 | };
14 |
--------------------------------------------------------------------------------
/template/src/components/controls/toolbar-items/InviteToolbarItem.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ToolbarItem, {ToolbarItemProps} from '../../../atoms/ToolbarItem';
3 | import CopyJoinInfo from '../../../subComponents/CopyJoinInfo';
4 |
5 | export interface Props extends Omit, 'children'> {}
6 |
7 | export const InviteToolbarItem = (props: Props) => {
8 | return (
9 |
10 |
11 |
12 | );
13 | };
14 |
--------------------------------------------------------------------------------
/template/src/components/controls/toolbar-items/ParticipantToolbarItem.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ToolbarItem, {ToolbarItemProps} from '../../../atoms/ToolbarItem';
3 | import {ParticipantsIconButton} from '../../Navbar';
4 |
5 | export interface Props extends ToolbarItemProps {}
6 |
7 | export const ParticipantToolbarItem = (props: Props) => {
8 | return (
9 |
10 |
11 |
12 | );
13 | };
14 |
--------------------------------------------------------------------------------
/template/src/components/controls/toolbar-items/ScreenshareToolbarItem.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ToolbarItem, {ToolbarItemProps} from '../../../atoms/ToolbarItem';
3 | import ScreenshareButton from '../../../subComponents/screenshare/ScreenshareButton';
4 |
5 | export interface Props extends ToolbarItemProps {}
6 |
7 | export const ScreenshareToolbarItem = (props: Props) => {
8 | return (
9 |
10 |
11 |
12 | );
13 | };
14 |
--------------------------------------------------------------------------------
/template/src/components/controls/toolbar-items/SettingsToolbarItem.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ToolbarItem, {ToolbarItemProps} from '../../../atoms/ToolbarItem';
3 | import Settings from '../../Settings';
4 |
5 | export interface Props extends Omit, 'children'> {}
6 |
7 | export const SettingsToolbarItem = (props: Props) => {
8 | return (
9 |
10 |
11 |
12 | );
13 | };
14 |
--------------------------------------------------------------------------------
/template/src/components/controls/toolbar-items/index.ts:
--------------------------------------------------------------------------------
1 | export {ChatToolbarItem} from './ChatToolbarItem';
2 | export {InviteToolbarItem} from './InviteToolbarItem';
3 | export {ParticipantToolbarItem} from './ParticipantToolbarItem';
4 | export {ScreenshareToolbarItem} from './ScreenshareToolbarItem';
5 | export {SettingsToolbarItem} from './SettingsToolbarItem';
6 |
--------------------------------------------------------------------------------
/template/src/components/dimension/DimensionContext.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import {createContext} from 'react';
13 |
14 | interface DimensionContextInterface {
15 | getDimensionData: (
16 | width?: number,
17 | height?: number,
18 | ) => {dim: [number, number, boolean]; isDesktop: boolean};
19 | }
20 |
21 | const DimensionContext = createContext({
22 | getDimensionData: () => {
23 | return {dim: [0, 0, false], isDesktop: false};
24 | },
25 | });
26 |
27 | export default DimensionContext;
28 |
--------------------------------------------------------------------------------
/template/src/components/dimension/DimensionProvider.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React from 'react';
13 | import {Dimensions} from 'react-native';
14 | import DimensionContext from './DimensionContext';
15 |
16 | const DimensionProvider = (props: {children: React.ReactNode}) => {
17 | const getDimensionData = (width?: number, height?: number) => {
18 | (width = width ? width : Dimensions.get('window').width),
19 | (height = height ? height : Dimensions.get('window').height);
20 | const dim: [number, number, boolean] = [width, height, width > height];
21 | return {
22 | dim: dim,
23 | isDesktop: width < height + 150 ? false : true,
24 | };
25 | };
26 |
27 | return (
28 |
29 | {props.children}
30 |
31 | );
32 | };
33 |
34 | export default DimensionProvider;
35 |
--------------------------------------------------------------------------------
/template/src/components/disable-chat/useDisableChat.tsx:
--------------------------------------------------------------------------------
1 | import {createHook} from 'customization-implementation';
2 | import React from 'react';
3 |
4 | type DisableChatObj = {
5 | [key: string]: {
6 | disableChat: boolean;
7 | };
8 | };
9 |
10 | export const DisableChatContext = React.createContext<{
11 | disableChatUids: DisableChatObj;
12 | setDisableChatUids: React.Dispatch>;
13 | }>({
14 | disableChatUids: {},
15 | setDisableChatUids: () => {},
16 | });
17 |
18 | const DisableChatProvider = ({children}) => {
19 | const [disableChatUids, setDisableChatUids] = React.useState(
20 | {},
21 | );
22 |
23 | return (
24 |
25 | {children}
26 |
27 | );
28 | };
29 |
30 | const useDisableChat = createHook(DisableChatContext);
31 |
32 | export {DisableChatProvider, useDisableChat};
33 |
--------------------------------------------------------------------------------
/template/src/components/livestream/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | LiveStreamControlMessageEnum,
3 | requestStatus,
4 | RaiseHandValue,
5 | raiseHandListInterface,
6 | } from './Types';
7 |
8 | import LiveStreamContext, {
9 | LiveStreamContextProvider,
10 | } from './LiveStreamContext';
11 |
12 | export {
13 | LiveStreamContext,
14 | LiveStreamContextProvider,
15 | LiveStreamControlMessageEnum,
16 | requestStatus,
17 | RaiseHandValue,
18 | };
19 | export type {raiseHandListInterface};
20 |
21 | export default LiveStreamContext;
22 |
--------------------------------------------------------------------------------
/template/src/components/livestream/views/LiveStreamControls.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React from 'react';
13 | import {LocalRaiseHand} from '../../../subComponents/livestream';
14 | import ToolbarItem from '../../../atoms/ToolbarItem';
15 |
16 | export interface LiveStreamControlsProps {
17 | showControls: boolean;
18 | showLabel?: boolean;
19 | customProps?: any;
20 | }
21 |
22 | const LiveStreamControls = (props: LiveStreamControlsProps) => {
23 | const {showControls} = props;
24 | if (!$config.RAISE_HAND) return <>>;
25 | if (!showControls) return <>>;
26 | return (
27 | <>
28 |
29 |
30 |
31 | >
32 | );
33 | };
34 |
35 | export default LiveStreamControls;
36 |
--------------------------------------------------------------------------------
/template/src/components/popups/StartScreenSharePopup.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const StartScreenSharePopup = () => {
4 | return <>>;
5 | };
6 | export default StartScreenSharePopup;
7 |
--------------------------------------------------------------------------------
/template/src/components/popups/StopScreenSharePopup.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const StopScreenSharePopup = () => {
4 | return <>>;
5 | };
6 | export default StopScreenSharePopup;
7 |
--------------------------------------------------------------------------------
/template/src/components/precall/PermissionHelper.native.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | const PermissionHelper = () => {
3 | return <>>;
4 | };
5 | export default PermissionHelper;
6 |
--------------------------------------------------------------------------------
/template/src/components/precall/index.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 |
13 | import PreCallLocalMute, {PreCallLocalMuteComponentsArray} from './LocalMute';
14 | import PreCallVideoPreview from './VideoPreview';
15 | import PreCallSelectDevice from './selectDevice';
16 | import PreCallJoinBtn, {PreCallJoinCallBtnProps} from './joinCallBtn';
17 | import PreCallTextInput from './textInput';
18 | import PreCallMeetingTitle from './meetingTitle';
19 | import JoinWaitingRoomBtn from './joinWaitingRoomBtn';
20 | export {
21 | PreCallLocalMuteComponentsArray,
22 | PreCallLocalMute,
23 | PreCallVideoPreview,
24 | PreCallSelectDevice,
25 | PreCallJoinBtn,
26 | PreCallTextInput,
27 | PreCallMeetingTitle,
28 | JoinWaitingRoomBtn,
29 | };
30 | export type {PreCallJoinCallBtnProps};
31 |
--------------------------------------------------------------------------------
/template/src/components/precall/selectDevice.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 |
13 | import React from 'react';
14 | import {View, StyleSheet, Text} from 'react-native';
15 | import {isWebInternal} from '../../utils/common';
16 | import SelectDevice from '../../subComponents/SelectDevice';
17 | import {useString} from '../../utils/useString';
18 |
19 | export interface DeviceSelectProps {
20 | isOnPrecall?: boolean;
21 | }
22 | const selectDevice = (props?: DeviceSelectProps) => {
23 | return ;
24 | };
25 |
26 | export default selectDevice;
27 |
--------------------------------------------------------------------------------
/template/src/components/useMount.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import {useEffect} from 'react';
13 |
14 | const useMount = (effect: () => (() => void) | void) => {
15 | useEffect(effect, []);
16 | };
17 |
18 | export default useMount;
19 |
--------------------------------------------------------------------------------
/template/src/components/virtual-background/VideoPreview.native.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {MaxVideoView, useLocalUid} from '../../../agora-rn-uikit';
3 | import {useContent, usePreCall, useRtc} from 'customization-api';
4 | import InlineNotification from '../../atoms/InlineNotification';
5 | import {useString} from '../../utils/useString';
6 | import {vbPanelInfo} from '../../language/default-labels/precallScreenLabels';
7 |
8 | interface VideoPreviewProps {
9 | isLocalVideoON?: boolean;
10 | }
11 |
12 | const VideoPreview = ({isLocalVideoON = false}: VideoPreviewProps) => {
13 | const {defaultContent} = useContent();
14 | const {isCameraAvailable} = usePreCall();
15 | const localUid = useLocalUid();
16 |
17 | const rtc = useRtc();
18 | const fallbackText = useString(vbPanelInfo);
19 | rtc?.RtcEngineUnsafe?.startPreview();
20 |
21 | if (!isLocalVideoON) {
22 | return ;
23 | }
24 |
25 | return (
26 | (
30 |
31 | )}
32 | isFullView={true}
33 | containerStyle={{
34 | width: '100%',
35 | height: '100%',
36 | borderRadius: 12,
37 | overflow: 'hidden',
38 | }}
39 | />
40 | );
41 | };
42 |
43 | export default VideoPreview;
44 |
--------------------------------------------------------------------------------
/template/src/components/virtual-background/images/index.ts:
--------------------------------------------------------------------------------
1 | /* Issue: https://github.com/facebook/react-native/issues/24963
2 |
3 | Debug Mode :
4 | uri - http://localhost:8081/assets/src/components/virtual-background/images/book.jpg?platform=android&hash=07b15d3ef95fa780f109944e6b96167e
5 |
6 | Release Mode:
7 | uri - src_components_virtualbackground_images_book
8 |
9 | so using base64 image format
10 |
11 | */
12 |
13 | import bookImageBase64 from './bookImageBase64';
14 | import beachImageBase64 from './beachImageBase64';
15 | import bedroomImageBase64 from './bedroomImageBase64';
16 | import earthImageBase64 from './earthImageBase64';
17 | import lampImageBase64 from './lampImageBase64';
18 | import mountainsImageBase64 from './mountainsImageBase64';
19 | import office1ImageBase64 from './office1ImageBase64';
20 | import officeImageBase64 from './officeImageBase64';
21 | import plantsImageBase64 from './plantsImageBase64';
22 | import skyImageBase64 from './skyImageBase64';
23 | import wallImageBase64 from './wallImageBase64';
24 |
25 | export default {
26 | bookImageBase64,
27 | beachImageBase64,
28 | bedroomImageBase64,
29 | earthImageBase64,
30 | lampImageBase64,
31 | mountainsImageBase64,
32 | office1ImageBase64,
33 | officeImageBase64,
34 | plantsImageBase64,
35 | skyImageBase64,
36 | wallImageBase64,
37 | };
38 |
--------------------------------------------------------------------------------
/template/src/components/whiteboard/WhiteboardWrapper.tsx:
--------------------------------------------------------------------------------
1 | import React, {useContext} from 'react';
2 | import {whiteboardContext} from './WhiteboardConfigure';
3 | import VideoRenderer from '../../pages/video-call/VideoRenderer';
4 | import {useContent} from 'customization-api';
5 | import WhiteboardView from './WhiteboardView';
6 |
7 | const WhiteboardWrapper = () => {
8 | const {getWhiteboardUid} = useContext(whiteboardContext);
9 | const {customContent, pinnedUid, activeUids} = useContent();
10 |
11 | if (
12 | customContent &&
13 | getWhiteboardUid() &&
14 | customContent[getWhiteboardUid()]?.uid
15 | ) {
16 | return (
17 |
33 | );
34 | }
35 | return null;
36 | };
37 |
38 | export default WhiteboardWrapper;
39 |
--------------------------------------------------------------------------------
/template/src/language/default-labels/index.ts:
--------------------------------------------------------------------------------
1 | import {CommonLabels, I18nCommonLabelsInterface} from './commonLabels';
2 | import {
3 | CreateScreenLabels,
4 | I18nCreateScreenLabelsInterface,
5 | } from './createScreenLabels';
6 | import {
7 | JoinScreenLabels,
8 | I18nJoinScreenLabelsInterface,
9 | } from './joinScreenLabels';
10 | import {
11 | ShareLinkScreenLabels,
12 | I18nShareLinkScreenLabelsInterface,
13 | } from './shareLinkScreenLabels';
14 | import {
15 | VideoCallScreenLabels,
16 | I18nVideoCallScreenLabelsInterface,
17 | } from './videoCallScreenLabels';
18 | import {
19 | PrecallScreenLabels,
20 | I18nPrecallScreenLabelsInterface,
21 | } from './precallScreenLabels';
22 |
23 | export interface TextDataInterface
24 | extends I18nCommonLabelsInterface,
25 | I18nCreateScreenLabelsInterface,
26 | I18nJoinScreenLabelsInterface,
27 | I18nShareLinkScreenLabelsInterface,
28 | I18nVideoCallScreenLabelsInterface,
29 | I18nPrecallScreenLabelsInterface {}
30 |
31 | export const DEFAULT_LABELS: TextDataInterface = {
32 | ...CommonLabels,
33 | ...CreateScreenLabels,
34 | ...JoinScreenLabels,
35 | ...ShareLinkScreenLabels,
36 | ...PrecallScreenLabels,
37 | ...VideoCallScreenLabels,
38 | };
39 |
--------------------------------------------------------------------------------
/template/src/language/i18nTypes.ts:
--------------------------------------------------------------------------------
1 | import {TextDataInterface} from './default-labels/index';
2 |
3 | export type I18nBaseType = string | ((...args: T[]) => string);
4 | export type I18nDynamicType = I18nBaseType;
5 | export type I18nConditionalType = I18nBaseType;
6 | export interface I18nInterface {
7 | locale: string;
8 | label?: string;
9 | data: TextDataInterface;
10 | }
11 |
--------------------------------------------------------------------------------
/template/src/language/index.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import {I18nInterface} from './i18nTypes';
13 | import {DEFAULT_LABELS} from './default-labels/index';
14 | export const DEFAULT_I18_DATA: I18nInterface = {
15 | label: 'English US',
16 | locale: 'en-us',
17 | data: DEFAULT_LABELS,
18 | };
19 |
--------------------------------------------------------------------------------
/template/src/logger/constants.ts:
--------------------------------------------------------------------------------
1 | const CONFERENCING_APP_ID = 'b8c2ef0f986541a8992451c07d30fb4b';
2 | const CONFERENCING_PROJECT_ID = '8d2b1a60e4e0e95ac455';
3 | const isInternalApp =
4 | $config.APP_ID === CONFERENCING_APP_ID &&
5 | $config.PROJECT_ID === CONFERENCING_PROJECT_ID;
6 | // Send logs to configured transport-> Datadog (used for internal app - www.confercning.agora.io)
7 | // Use the app id strict check to keep this true
8 | export const ENABLE_AGORA_LOGGER_TRANSPORT =
9 | $config.LOG_ENABLED && isInternalApp;
10 | // $config.LOG_ENABLED && $config.APP_ID === CONFERENCING_APP_ID && true;
11 |
12 | // Send logs to configured transport-> axiom (used for customer deployed apps)
13 | export const ENABLE_CUSTOMER_LOGGER_TRANSPORT =
14 | $config.LOG_ENABLED && !isInternalApp;
15 |
16 | // Print logs to browser console window - true in dev mode
17 | export const ENABLE_BROWSER_CONSOLE_LOGS =
18 | $config.LOG_ENABLED && process.env.NODE_ENV === 'development';
19 |
--------------------------------------------------------------------------------
/template/src/logger/transports/agora-transport.ts:
--------------------------------------------------------------------------------
1 | import {StatusType, datadogLogs} from '@datadog/browser-logs';
2 |
3 | const DATADOG_CLIENT_TOKEN = 'pubad10d7feb87f0b039c267e69b46ee84e';
4 | const DATADOG_SITE = 'datadoghq.com';
5 |
6 | export const initTransportLayerForAgora = () => {
7 | datadogLogs.init({
8 | clientToken: DATADOG_CLIENT_TOKEN,
9 | site: DATADOG_SITE,
10 | forwardErrorsToLogs: false,
11 | sessionSampleRate: 100,
12 | service: 'app-builder-core-frontendv2',
13 | env: 'none',
14 | });
15 | };
16 |
17 | export const getTransportLogger = () => {
18 | return (
19 | logMessage: string,
20 | logType: StatusType,
21 | columns: Object,
22 | contextInfo: Object,
23 | logContent: any[],
24 | ) => {
25 | datadogLogs.logger.log(
26 | logMessage,
27 | {...columns, logMessage, logType, contextInfo, logContent},
28 | logType,
29 | logType === 'error'
30 | ? logContent?.length
31 | ? logContent[0]
32 | : undefined
33 | : undefined,
34 | );
35 | };
36 | };
37 |
--------------------------------------------------------------------------------
/template/src/pages/Login.tsx:
--------------------------------------------------------------------------------
1 | import React, {useState} from 'react';
2 | import {StyleSheet, View} from 'react-native';
3 | import {Logo} from '../components/common';
4 | import PrimaryButton from '../atoms/PrimaryButton';
5 | import {useAuth} from '../auth/AuthProvider';
6 | import Spacer from '../atoms/Spacer';
7 |
8 | export default function Login() {
9 | const {authLogin} = useAuth();
10 |
11 | return (
12 |
13 |
14 |
15 |
16 |
17 | );
18 | }
19 |
20 | const styles = StyleSheet.create({
21 | container: {
22 | flex: 1,
23 | alignItems: 'center',
24 | justifyContent: 'center',
25 | },
26 | });
27 |
--------------------------------------------------------------------------------
/template/src/pages/create/useCreate.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React, {createContext} from 'react';
13 | import {createHook} from 'customization-implementation';
14 |
15 | export interface CreateContextInterface {
16 | showShareScreen: () => void;
17 | }
18 |
19 | const CreateContext = createContext({
20 | showShareScreen: () => {},
21 | });
22 |
23 | interface CreateProviderProps {
24 | value: CreateContextInterface;
25 | children: React.ReactNode;
26 | }
27 |
28 | const CreateProvider = (props: CreateProviderProps) => {
29 | return (
30 |
31 | {props.children}
32 |
33 | );
34 | };
35 | const useCreate = createHook(CreateContext);
36 |
37 | export {CreateProvider, useCreate};
38 |
--------------------------------------------------------------------------------
/template/src/pages/video-call/RenderComponent.tsx:
--------------------------------------------------------------------------------
1 | import React, {useEffect} from 'react';
2 | import VideoRenderer from './VideoRenderer';
3 | import {UidType} from '../../../agora-rn-uikit';
4 | import {useContent} from 'customization-api';
5 | import {useCustomization} from 'customization-implementation';
6 | import {isValidReactComponent} from '../../utils/common';
7 |
8 | export type RenderComponentType = {[key: string]: React.FC};
9 |
10 | const DefaultRenderComponent: RenderComponentType = {
11 | rtc: VideoRenderer,
12 | screenshare: VideoRenderer,
13 | };
14 | interface RenderComponentProps {
15 | uid: UidType;
16 | isMax?: boolean;
17 | }
18 | const RenderComponent = ({uid, isMax = false}: RenderComponentProps) => {
19 | const {defaultContent, customContent, activeUids} = useContent();
20 | const RenderComp = DefaultRenderComponent['rtc'];
21 |
22 | if (customContent && customContent[uid] && customContent[uid]?.component) {
23 | const CustomComponent = customContent[uid]?.component;
24 | const CustomComponentProps = customContent[uid]?.props;
25 | //@ts-ignore
26 | return ;
27 | } else if (defaultContent[uid]) {
28 | return ;
29 | } else {
30 | return null;
31 | }
32 | };
33 |
34 | export default RenderComponent;
35 |
--------------------------------------------------------------------------------
/template/src/pages/video-call/ZoomableWrapper.native.tsx:
--------------------------------------------------------------------------------
1 | import {ReactNativeZoomableView} from '@openspacelabs/react-native-zoomable-view';
2 | import {isAndroid} from '../../utils/common';
3 | import React from 'react';
4 | import {View} from 'react-native';
5 | import {PinchableView} from './PinchableView';
6 |
7 | const ZoomableWrapper = (props) => {
8 | if (!props?.enableZoom) {
9 | return <>{props.children}>;
10 | }
11 |
12 | if (isAndroid()) {
13 | return (
14 |
20 |
27 | {props.children}
28 |
29 |
30 | );
31 | }
32 | return {props.children};
33 | };
34 | export default ZoomableWrapper;
35 |
--------------------------------------------------------------------------------
/template/src/pages/video-call/ZoomableWrapper.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | const ZoomableWrapper = (props) => {
3 | return <>{props.children}>;
4 | };
5 | export default ZoomableWrapper;
6 |
--------------------------------------------------------------------------------
/template/src/pages/video-call/useLayoutsData.ts:
--------------------------------------------------------------------------------
1 | import {useCustomization} from 'customization-implementation';
2 | import {DefaultLayouts} from './DefaultLayouts';
3 |
4 | /**
5 | * if custom layouts provided in customization api
6 | * @returns customLayouts array
7 | * else
8 | * @returns defaultLayouts array
9 | */
10 | function useLayoutsData() {
11 | const layoutsData = useCustomization((config) => {
12 | if (
13 | typeof config?.components?.videoCall === 'object' &&
14 | config?.components?.videoCall?.customLayout
15 | ) {
16 | return config.components.videoCall.customLayout(DefaultLayouts);
17 | } else {
18 | return DefaultLayouts;
19 | }
20 | });
21 | return layoutsData;
22 | }
23 | export default useLayoutsData;
24 |
--------------------------------------------------------------------------------
/template/src/rtm-events-api/LocalEvents.ts:
--------------------------------------------------------------------------------
1 | import {EventEmitter} from 'events';
2 | export enum LocalEventsEnum {
3 | ACTIVE_SPEAKER = 'ACTIVE_SPEAKER',
4 | WHITEBOARD_FILE_UPLOAD = 'WHITEBOARD_FILE_UPLOAD',
5 | WHITEBOARD_ACTIVE_LOCAL = 'WHITEBOARD_ACTIVE_LOCAL',
6 | BOARD_COLOR_CHANGED_LOCAL = 'BOARD_COLOR_CHANGED_LOCAL',
7 | WHITEBOARD_LAST_IMAGE_UPLOAD_POSITION_LOCAL = 'WHITEBOARD_LAST_IMAGE_UPLOAD_POSITION_LOCAL',
8 | WHITEBOARD_ON = 'WHITEBOARD_ON',
9 | WHITEBOARD_OFF = 'WHITEBOARD_OFF',
10 | MIC_CHANGED = 'MIC_CHANGED',
11 | CLEAR_WHITEBOARD = 'CLEAR_WHITEBOARD',
12 | USER_KICKED_OFF_BY_REMOTE_HOST = 'USER_KICKED_OFF_BY_REMOTE_HOST',
13 | AGENT_TRANSCRIPT_CHANGE = 'AGENT_TRANSCRIPT_CHANGE',
14 | SDK_TOKEN_CHANGED = 'SDK_TOKEN_CHANGED',
15 | }
16 | const LocalEventEmitter = new EventEmitter();
17 | export default LocalEventEmitter;
18 |
--------------------------------------------------------------------------------
/template/src/rtm-events-api/index.tsx:
--------------------------------------------------------------------------------
1 | import Events from './Events';
2 |
3 | export * from './types';
4 |
5 | const events = new Events();
6 | export default events;
7 |
--------------------------------------------------------------------------------
/template/src/rtm-events-api/types.ts:
--------------------------------------------------------------------------------
1 | import {UidType} from '../../agora-rn-uikit';
2 |
3 | export type ReceiverUid = UidType | UidType[];
4 |
5 | export type EventPayload = string | Record;
6 |
7 | export enum EventSource {
8 | core = 'core',
9 | fpe = 'fpe',
10 | }
11 | export enum PersistanceLevel {
12 | 'None' = 1,
13 | 'Sender',
14 | 'Session',
15 | 'Channel',
16 | }
17 | export interface RTMAttributePayload {
18 | evt: string;
19 | value: string;
20 | }
21 | interface EventCallbackPayload {
22 | payload: string;
23 | persistLevel: PersistanceLevel;
24 | sender: UidType;
25 | ts: number;
26 | }
27 | export type EventCallback = (args: EventCallbackPayload) => void;
28 |
--------------------------------------------------------------------------------
/template/src/rtm-events/EventsQueue.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2022 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 |
13 | interface IQueueEvent {
14 | data: any;
15 | uid: number | string;
16 | ts: number;
17 | }
18 |
19 | const EventsQueue = (function () {
20 | 'use strict';
21 |
22 | let _eventsQueue: any = [];
23 |
24 | return {
25 | enqueue(q: IQueueEvent) {
26 | _eventsQueue.push(q);
27 | },
28 | dequeue() {
29 | if (_eventsQueue.length == 0) return;
30 | return _eventsQueue.pop();
31 | },
32 | isEmpty() {
33 | return _eventsQueue.length === 0;
34 | },
35 | size() {
36 | return _eventsQueue.length;
37 | },
38 | clear() {
39 | _eventsQueue = [];
40 | },
41 | };
42 | })();
43 |
44 | export default EventsQueue;
45 |
--------------------------------------------------------------------------------
/template/src/rtm-events/index.tsx:
--------------------------------------------------------------------------------
1 | import EventUtils from './EventUtils';
2 | import EventsQueue from './EventsQueue';
3 |
4 | export * from './constants';
5 |
6 | export {EventUtils, EventsQueue};
7 |
--------------------------------------------------------------------------------
/template/src/rtm/utils.ts:
--------------------------------------------------------------------------------
1 | export const hasJsonStructure = (str: string) => {
2 | if (typeof str !== 'string') return false;
3 | try {
4 | const result = JSON.parse(str);
5 | const type = Object.prototype.toString.call(result);
6 | return type === '[object Object]' || type === '[object Array]';
7 | } catch (err) {
8 | return false;
9 | }
10 | };
11 |
12 | export const safeJsonParse = (str: string) => {
13 | try {
14 | return [null, JSON.parse(str)];
15 | } catch (err) {
16 | return [err];
17 | }
18 | };
19 |
20 | export const adjustUID = (uid: number): number => {
21 | let adjustedUID = uid;
22 | if (adjustedUID < 0) {
23 | adjustedUID = uid + parseInt('0xffffffff') + 1;
24 | }
25 | return adjustedUID;
26 | };
27 |
28 | export const timeNow = () => new Date().getTime();
29 |
30 | export const getMessageTime = (ts?: number): number => {
31 | if (!ts) return timeNow();
32 | try {
33 | const timestamp = new Date(ts).getTime();
34 | return isNaN(timestamp) ? timeNow() : timestamp;
35 | } catch (error) {
36 | return timeNow();
37 | }
38 | };
39 |
40 | export const get32BitUid = (peerId: string) => {
41 | let arr = new Int32Array(1);
42 | arr[0] = parseInt(peerId);
43 | return arr[0];
44 | };
45 |
--------------------------------------------------------------------------------
/template/src/subComponents/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgoraIO-Community/app-builder-core/4a8b0d8d7bc35c051281f9ff78ac5144b0b93732/template/src/subComponents/.DS_Store
--------------------------------------------------------------------------------
/template/src/subComponents/Clipboard.native.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | /**
13 | * On mobile, the clipboard is imported from the community module since react-native
14 | * has deprecated clipboard API as a part of the lean core effort
15 | */
16 | import Clipboard from '@react-native-community/clipboard';
17 |
18 | export default Clipboard;
19 |
--------------------------------------------------------------------------------
/template/src/subComponents/Clipboard.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | /**
13 | * On web and electron web, we use the clipbord component from the react-native-web library
14 | */
15 | import {Clipboard} from 'react-native';
16 |
17 | export default Clipboard;
18 |
--------------------------------------------------------------------------------
/template/src/subComponents/Illustration.native.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | /**
13 | * Empty component. There is illustraion on mobile devices
14 | */
15 | const Illustration = () => {
16 | return {};
17 | };
18 |
19 | export default Illustration;
20 |
--------------------------------------------------------------------------------
/template/src/subComponents/Illustration.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React from 'react';
13 | import {Image, StyleSheet} from 'react-native';
14 |
15 | /**
16 | * Displays the illustration.
17 | */
18 | const Illustration = () => {
19 | return (
20 |
30 | );
31 | };
32 |
33 | const styles = StyleSheet.create({
34 | illustration: {flex: 1},
35 | });
36 | export default Illustration;
37 |
--------------------------------------------------------------------------------
/template/src/subComponents/Logo.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React from 'react';
13 | import {Image, TouchableOpacity, StyleSheet} from 'react-native';
14 | import {useHistory} from '../components/Router';
15 |
16 | /**
17 | * Displays the logo.
18 | */
19 | export default function Logo() {
20 | const history = useHistory();
21 |
22 | return (
23 | history.replace('/')}>
24 |
29 |
30 | );
31 | }
32 |
33 | const styles = StyleSheet.create({
34 | logo: {
35 | minWidth: 60,
36 | minHeight: 30,
37 | },
38 | marginAuto: {
39 | width: '30%',
40 | height: '30%',
41 | minWidth: 60,
42 | minHeight: 30,
43 | // height: 'auto',
44 | },
45 | });
46 |
--------------------------------------------------------------------------------
/template/src/subComponents/Platform.electron.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | // utility to detect the appropriate platform.
13 | // When one imports Platform module, the correct platform gets imported from
14 | // either Platform.tsx or Platform.electron.tsx or Platform.native.tsx
15 | export default 'electron';
16 |
--------------------------------------------------------------------------------
/template/src/subComponents/Platform.native.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | // utility to detect the appropriate platform.
13 | // When one imports Platform module, the correct platform gets imported from
14 | // either Platform.tsx or Platform.electron.tsx or Platform.native.tsx
15 | export default 'native';
16 |
--------------------------------------------------------------------------------
/template/src/subComponents/Platform.ts:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | // utility to detect the appropriate platform.
13 | // When one imports Platform module, the correct platform gets imported from
14 | // either Platform.tsx or Platform.electron.tsx or Platform.native.tsx
15 | export default 'web';
16 |
--------------------------------------------------------------------------------
/template/src/subComponents/SidePanelButtons.ts:
--------------------------------------------------------------------------------
1 | import {
2 | RemoteLiveStreamApprovedRequestRecall,
3 | RemoteLiveStreamRequestApprove,
4 | RemoteLiveStreamRequestReject,
5 | RemoteLiveStreamApprovedRequestRecallProps,
6 | RemoteLiveStreamControlProps,
7 | } from './livestream';
8 | import RemoteAudioMute, {RemoteAudioMuteProps} from './RemoteAudioMute';
9 | import RemoteVideoMute, {RemoteVideoMuteProps} from './RemoteVideoMute';
10 | import RemoteEndCall, {RemoteEndCallProps} from './RemoteEndCall';
11 | import {
12 | MuteAllAudioButton,
13 | MuteAllAudioButtonProps,
14 | MuteAllVideoButton,
15 | MuteAllVideoButtonProps,
16 | } from '../components/HostControlView';
17 |
18 | type SidePanelButtonsArrayProps = [
19 | (props: RemoteAudioMuteProps) => JSX.Element,
20 | (props: RemoteVideoMuteProps) => JSX.Element,
21 | (props: RemoteEndCallProps) => JSX.Element,
22 | (props: RemoteLiveStreamApprovedRequestRecallProps) => JSX.Element,
23 | (props: RemoteLiveStreamControlProps) => JSX.Element,
24 | (props: RemoteLiveStreamControlProps) => JSX.Element,
25 | (props: MuteAllAudioButtonProps) => JSX.Element,
26 | (props: MuteAllVideoButtonProps) => JSX.Element,
27 | ];
28 | export const SidePanelButtonsArray: SidePanelButtonsArrayProps = [
29 | RemoteAudioMute,
30 | RemoteVideoMute,
31 | RemoteEndCall,
32 | RemoteLiveStreamApprovedRequestRecall,
33 | RemoteLiveStreamRequestApprove,
34 | RemoteLiveStreamRequestReject,
35 | MuteAllAudioButton,
36 | MuteAllVideoButton,
37 | ];
38 |
--------------------------------------------------------------------------------
/template/src/subComponents/SidePanelEnum.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | export enum SidePanelType {
13 | None = 'None',
14 | Participants = 'Participants',
15 | Chat = 'Chat',
16 | Settings = 'Settings',
17 | Transcript = 'Transcript',
18 | VirtualBackground = 'VirtualBackground',
19 | }
20 |
--------------------------------------------------------------------------------
/template/src/subComponents/Watermark.tsx:
--------------------------------------------------------------------------------
1 | /*
2 | ********************************************
3 | Copyright © 2021 Agora Lab, Inc., all rights reserved.
4 | AppBuilder and all associated components, source code, APIs, services, and documentation
5 | (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6 | accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7 | Use without a license or in violation of any license terms and conditions (including use for
8 | any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9 | information visit https://appbuilder.agora.io.
10 | *********************************************
11 | */
12 | import React from 'react';
13 | import {Image, StyleSheet} from 'react-native';
14 |
15 | /**
16 | * A translucent watermark image that can added in various parts of the the application.
17 | * Not in use at the moment
18 | */
19 | const Watermark = () => {
20 | return (
21 | //
22 |
27 | );
28 | };
29 |
30 | const styles = StyleSheet.create({
31 | image: {
32 | position: 'absolute',
33 | bottom: '2%',
34 | left: '3%',
35 | width: 90,
36 | height: 30,
37 | zIndex: 100,
38 | opacity: 0.5,
39 | },
40 | });
41 |
42 | export default Watermark;
43 |
--------------------------------------------------------------------------------
/template/src/subComponents/caption/index.ts:
--------------------------------------------------------------------------------
1 | import CaptionButton from './CaptionButton';
2 |
3 | export {CaptionButton};
4 |
--------------------------------------------------------------------------------
/template/src/subComponents/caption/proto/test.proto:
--------------------------------------------------------------------------------
1 | syntax = "proto3";
2 | package agora.audio2text;
3 | option java_package = "io.agora.rtc.audio2text";
4 | option java_outer_classname = "Audio2TextProtobuffer";
5 | message Text {
6 | int32 vendor = 1;
7 | int32 version = 2;
8 | int32 seqnum = 3;
9 | uint32 uid = 4;
10 | int32 flag = 5;
11 | int64 time = 6;
12 | int32 lang = 7;
13 | int32 starttime = 8;
14 | int32 offtime = 9;
15 | repeated Word words = 10;
16 | }
17 | message Word {
18 | string text = 1;
19 | int32 start_ms = 2;
20 | int32 duration_ms = 3;
21 | bool is_final = 4;
22 | double confidence = 5;
23 | }
--------------------------------------------------------------------------------
/template/src/subComponents/caption/useCaptionWidth.ts:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {useWindowDimensions} from 'react-native';
3 | import {useCaption} from './useCaption';
4 | import {useSidePanel, SidePanelType} from 'customization-api';
5 | import {CAPTION_CONTAINER_HEIGHT} from '../../../src/components/CommonStyles';
6 |
7 | interface CaptionWidthReturnType {
8 | isCaptionNotFullWidth: boolean;
9 | transcriptHeight: string;
10 | }
11 |
12 | const useCaptionWidth = (): CaptionWidthReturnType => {
13 | const {isCaptionON} = useCaption();
14 | const {width: windowWidth, height: windowHeight} = useWindowDimensions();
15 | const {sidePanel} = useSidePanel();
16 |
17 | const isCaptionNotFullWidth =
18 | isCaptionON && sidePanel !== SidePanelType.None && windowWidth > 1200;
19 |
20 | const transcriptHeight = isCaptionNotFullWidth
21 | ? `calc(100% + ${CAPTION_CONTAINER_HEIGHT}px + 4px)` //10px is gap b/w