├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── documentation-request.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .gitmodules ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── NOTICE ├── README.md ├── analytics └── meeting-event-dashboard │ ├── README.md │ └── meeting-events-blog-template.yaml ├── apps ├── amplify-demo │ ├── .gitignore │ ├── README.md │ ├── lambda │ │ └── index.js │ ├── package-lock.json │ ├── package.json │ ├── public │ │ ├── architecture_diagram.jpg │ │ └── index.html │ ├── schema.graphql │ ├── src │ │ ├── components │ │ │ ├── Meeting.tsx │ │ │ └── MeetingForm.tsx │ │ ├── index.tsx │ │ └── utils │ │ │ └── api.ts │ └── tsconfig.json ├── android-webview-sample │ ├── .gitignore │ ├── README.md │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── amazonaws │ │ │ │ └── android_webview_sample │ │ │ │ └── AndroidWebView_UITest.kt │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── amazonaws │ │ │ │ └── android_webview_sample │ │ │ │ ├── AppConfig.kt │ │ │ │ ├── MainActivity.kt │ │ │ │ ├── MainFragment.kt │ │ │ │ └── WebviewFragment.kt │ │ │ └── res │ │ │ ├── layout │ │ │ ├── activity_main.xml │ │ │ ├── content_main.xml │ │ │ ├── fragment_main.xml │ │ │ └── fragment_webview.xml │ │ │ ├── navigation │ │ │ └── nav_graph.xml │ │ │ ├── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── themes.xml │ │ │ └── xml │ │ │ └── backup_descriptor.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── chat-android │ ├── .gitignore │ ├── README.md │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── ic_launcher-playstore.png │ │ │ ├── java │ │ │ └── com │ │ │ │ └── amazonaws │ │ │ │ └── services │ │ │ │ └── chime │ │ │ │ └── sdkdemo │ │ │ │ ├── AmazonChimeSDKMessagingDemoApp.kt │ │ │ │ ├── DefaultFirebaseMessagingService.kt │ │ │ │ ├── ServiceLocator.kt │ │ │ │ ├── ViewModelFactory.kt │ │ │ │ ├── common │ │ │ │ ├── AppConstants.kt │ │ │ │ ├── coroutine │ │ │ │ │ └── CoroutineContextProvider.kt │ │ │ │ └── extensions │ │ │ │ │ ├── AndroidExtension.kt │ │ │ │ │ └── JavaExtension.kt │ │ │ │ ├── data │ │ │ │ ├── Channel.kt │ │ │ │ ├── ChannelMessage.kt │ │ │ │ ├── Result.kt │ │ │ │ ├── User.kt │ │ │ │ ├── UserEndpoint.kt │ │ │ │ └── source │ │ │ │ │ ├── DefaultMessageRepository.kt │ │ │ │ │ ├── DefaultUserRepository.kt │ │ │ │ │ ├── MessageRepository.kt │ │ │ │ │ ├── UserRepository.kt │ │ │ │ │ └── service │ │ │ │ │ ├── AmazonChimeSDKService.kt │ │ │ │ │ ├── AuthService.kt │ │ │ │ │ ├── DefaultAmazonChimeSDKService.kt │ │ │ │ │ └── DefaultAuthService.kt │ │ │ │ └── ui │ │ │ │ ├── base │ │ │ │ ├── BaseActivity.kt │ │ │ │ └── ViewState.kt │ │ │ │ ├── channel │ │ │ │ ├── presentation │ │ │ │ │ ├── AppInstanceSettingsViewModel.kt │ │ │ │ │ └── ChannelViewModel.kt │ │ │ │ └── view │ │ │ │ │ ├── activity │ │ │ │ │ ├── AppInstanceSettingsActivity.kt │ │ │ │ │ └── ChannelActivity.kt │ │ │ │ │ └── adapter │ │ │ │ │ └── ChannelAdapter.kt │ │ │ │ ├── messaging │ │ │ │ ├── presentation │ │ │ │ │ ├── MessagingViewModel.kt │ │ │ │ │ └── NotificationSettingsViewModel.kt │ │ │ │ └── view │ │ │ │ │ ├── activity │ │ │ │ │ ├── MessagingActivity.kt │ │ │ │ │ └── NotificationSettingsActivity.kt │ │ │ │ │ └── adapter │ │ │ │ │ └── MessageAdapter.kt │ │ │ │ └── signin │ │ │ │ ├── presentation │ │ │ │ └── SignInViewModel.kt │ │ │ │ └── view │ │ │ │ └── SignInActivity.kt │ │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ ├── bubble_my_message.xml │ │ │ ├── bubble_their_message.xml │ │ │ ├── button_send_message.xml │ │ │ └── ic_up.xml │ │ │ ├── layout │ │ │ ├── activity_app_instance_settings.xml │ │ │ ├── activity_channels.xml │ │ │ ├── activity_messaging.xml │ │ │ ├── activity_notification_settings.xml │ │ │ ├── activity_signin.xml │ │ │ ├── channel_item.xml │ │ │ └── message_item.xml │ │ │ ├── menu │ │ │ ├── app_instance_settings.xml │ │ │ └── channel_settings.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_background.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_background.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_background.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_background.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_background.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── raw │ │ │ └── amplifyconfiguration.json │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── media │ │ └── awsChimeSDKMessagingDemo.png │ ├── messaging-websocket │ │ ├── build.gradle │ │ ├── src │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── amazonaws │ │ │ │ └── services │ │ │ │ └── chime │ │ │ │ └── sdk │ │ │ │ └── messaging │ │ │ │ ├── Message.kt │ │ │ │ ├── internal │ │ │ │ ├── DefaultWebSocketAdapter.kt │ │ │ │ ├── WebSocketAdapter.kt │ │ │ │ └── WebSocketAdapterObserver.kt │ │ │ │ ├── session │ │ │ │ ├── ChimeUserCredentials.kt │ │ │ │ ├── DefaultMessagingSession.kt │ │ │ │ ├── MessagingSession.kt │ │ │ │ ├── MessagingSessionConfiguration.kt │ │ │ │ ├── MessagingSessionObserver.kt │ │ │ │ └── MessagingSessionStatus.kt │ │ │ │ └── utils │ │ │ │ ├── DefaultSigV4.kt │ │ │ │ ├── ObserverUtils.kt │ │ │ │ ├── SigV4.kt │ │ │ │ └── logger │ │ │ │ ├── ConsoleLogger.kt │ │ │ │ ├── LogLevel.kt │ │ │ │ └── Logger.kt │ │ └── version.properties │ ├── pre-commit │ └── settings.gradle ├── chat-ios │ ├── .gitignore │ ├── AmazonChimeSDKMessagingDemo.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── swiftpm │ │ │ │ └── Package.resolved │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── AmazonChimeSDKMessagingDemo.xcscheme │ ├── AmazonChimeSDKMessagingDemo.xcworkspace │ │ └── contents.xcworkspacedata │ ├── AmazonChimeSDKMessagingDemo │ │ ├── AmazonChimeSDKMessagingDemo.entitlements │ │ ├── AppConfiguration.swift │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ ├── AccentColor.colorset │ │ │ │ └── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── SceneDelegate.swift │ │ ├── amplifyconfiguration.json │ │ ├── controllers │ │ │ ├── ChannelTableViewController.swift │ │ │ ├── ChatViewController.swift │ │ │ ├── NotificationSettingsViewController.swift │ │ │ ├── SettingsViewController.swift │ │ │ └── SignInViewController.swift │ │ ├── entity │ │ │ ├── ChatMessage.swift │ │ │ ├── ChatMessageTableViewCell.swift │ │ │ ├── CredentialExchangeResponse.swift │ │ │ ├── Message.swift │ │ │ ├── NotificationLevel.swift │ │ │ ├── Payload.swift │ │ │ └── User.swift │ │ ├── messaging-websocket │ │ │ ├── internal │ │ │ │ ├── DefaultWebSocketAdapter.swift │ │ │ │ ├── WebSocketAdapter.swift │ │ │ │ └── WebSocketAdapterObserver.swift │ │ │ ├── session │ │ │ │ ├── ChimeUserCredentials.swift │ │ │ │ ├── DefaultMessagingSession.swift │ │ │ │ ├── MessagingSession.swift │ │ │ │ ├── MessagingSessionConfiguration.swift │ │ │ │ ├── MessagingSessionObserver.swift │ │ │ │ └── MessagingSessionStatus.swift │ │ │ └── utils │ │ │ │ ├── ConcurrentMutableSet.swift │ │ │ │ ├── DefaultSigV4.swift │ │ │ │ ├── ObserverUtils.swift │ │ │ │ └── SigV4.swift │ │ ├── models │ │ │ ├── ChatModel.swift │ │ │ ├── NotificationSettingsModel.swift │ │ │ └── SettingsModel.swift │ │ ├── service │ │ │ ├── AWSChimeSDKIdentityService.swift │ │ │ ├── AWSChimeSDKMessagingService.swift │ │ │ ├── AttachmentService.swift │ │ │ └── AuthService.swift │ │ └── utils │ │ │ ├── Constants.swift │ │ │ ├── Extensions.swift │ │ │ ├── HttpUtils.swift │ │ │ └── Utils.swift │ ├── Podfile │ ├── README.md │ └── media │ │ └── awsChimeSDKMessagingDemo.png ├── chat │ ├── .babelrc │ ├── .eslintrc │ ├── README.md │ ├── app │ │ └── chat.html │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── Chat.css │ │ ├── Chat.jsx │ │ ├── Config.js │ │ ├── api │ │ │ └── ChimeAPI.js │ │ ├── backend │ │ │ └── serverless │ │ │ │ ├── appconfig.json │ │ │ │ ├── channelFlowBlogTemplate.yaml │ │ │ │ ├── samconfig.toml │ │ │ │ └── template.yaml │ │ ├── components │ │ │ ├── ActivityBar │ │ │ │ └── index.tsx │ │ │ ├── Authenticated.js │ │ │ ├── Card │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ │ ├── ChannelModals │ │ │ │ ├── AddMemberModal.jsx │ │ │ │ ├── BanModal.jsx │ │ │ │ ├── ChannelModals.css │ │ │ │ ├── DeleteChannelModal.jsx │ │ │ │ ├── EditChannelModal.jsx │ │ │ │ ├── JoinMeetingModal.css │ │ │ │ ├── JoinMeetingModal.jsx │ │ │ │ ├── JoinSubChannelModel.jsx │ │ │ │ ├── LeaveChannelModal.jsx │ │ │ │ ├── ListSubChannelModel.jsx │ │ │ │ ├── ManageChannelFlowModal.jsx │ │ │ │ ├── ManageMembersModal.jsx │ │ │ │ ├── NewChannelModal.css │ │ │ │ ├── NewChannelModal.jsx │ │ │ │ ├── SetCustomStatusModal.css │ │ │ │ ├── SetCustomStatusModal.jsx │ │ │ │ ├── ViewChannelDetailsModal.jsx │ │ │ │ ├── ViewMembersModal.jsx │ │ │ │ └── index.jsx │ │ │ ├── ContactPicker │ │ │ │ └── index.js │ │ │ └── DeviceSelection │ │ │ │ ├── CameraDevices │ │ │ │ └── index.tsx │ │ │ │ ├── MicrophoneDevices │ │ │ │ ├── MicrophoneActivityPreview.tsx │ │ │ │ ├── MicrophoneActivityPreviewBar.tsx │ │ │ │ └── index.tsx │ │ │ │ ├── SpeakerDevices │ │ │ │ └── index.tsx │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ ├── constants │ │ │ ├── index.ts │ │ │ └── routes.jsx │ │ ├── containers │ │ │ ├── EndMeetingControl │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ │ ├── MeetingChat.tsx │ │ │ ├── MeetingControls │ │ │ │ ├── Styled.ts │ │ │ │ └── index.tsx │ │ │ ├── MeetingDetails │ │ │ │ ├── Styled.ts │ │ │ │ └── index.tsx │ │ │ ├── MeetingJoinDetails.tsx │ │ │ ├── MeetingMetrics │ │ │ │ ├── Styled.ts │ │ │ │ └── index.tsx │ │ │ ├── MeetingRoster.tsx │ │ │ ├── Navigation │ │ │ │ ├── NavigationControl.tsx │ │ │ │ └── index.tsx │ │ │ ├── NoMeetingRedirect.tsx │ │ │ ├── Notifications │ │ │ │ └── index.jsx │ │ │ ├── Presence │ │ │ │ ├── ChannelPresence.css │ │ │ │ └── ChannelPresence.jsx │ │ │ ├── TypingIndicator │ │ │ │ ├── index.css │ │ │ │ └── index.tsx │ │ │ ├── channels │ │ │ │ ├── ChannelsWrapper.css │ │ │ │ ├── ChannelsWrapper.jsx │ │ │ │ └── ModalManager.jsx │ │ │ ├── input │ │ │ │ ├── Input.css │ │ │ │ └── Input.jsx │ │ │ ├── loginWithCognito │ │ │ │ ├── LoginWithCognito.css │ │ │ │ └── LoginWithCognito.jsx │ │ │ ├── loginWithCredentialExchangeService │ │ │ │ ├── LoginWithCredentialExchangeService.css │ │ │ │ └── LoginWithCredentialExchangeService.jsx │ │ │ └── messages │ │ │ │ ├── AttachmentProcessor.jsx │ │ │ │ ├── Messages.css │ │ │ │ └── Messages.jsx │ │ ├── hooks │ │ │ └── useMeetingEndRedirect.tsx │ │ ├── index.js │ │ ├── providers │ │ │ ├── AppStateProvider.jsx │ │ │ ├── AuthProvider.jsx │ │ │ ├── ChatMessagesProvider │ │ │ │ └── index.jsx │ │ │ ├── IdentityProvider.jsx │ │ │ ├── NavigationProvider.tsx │ │ │ └── UserPermissionProvider.jsx │ │ ├── services │ │ │ ├── AttachmentService.js │ │ │ ├── IdentityService.js │ │ │ ├── MessagingService.js │ │ │ └── servicesConfig.js │ │ ├── utilities │ │ │ ├── TestSound.tsx │ │ │ ├── arnParser.js │ │ │ ├── formatBytes.js │ │ │ ├── insertDateHeaders.jsx │ │ │ ├── mergeArrays.js │ │ │ ├── presence.js │ │ │ └── styles.css │ │ └── views │ │ │ ├── Channels │ │ │ ├── index.jsx │ │ │ └── style.css │ │ │ ├── DeviceSetup │ │ │ ├── Styled.ts │ │ │ └── index.tsx │ │ │ ├── Meeting │ │ │ ├── Styled.ts │ │ │ └── index.tsx │ │ │ └── Signin │ │ │ ├── index.jsx │ │ │ └── style.css │ ├── tsconfig.json │ └── webpack.config.js ├── iOS-WKWebView-sample │ ├── .gitignore │ ├── README.md │ ├── WkWebView Demo.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── WkWebView Demo.xcscheme │ ├── WkWebView Demo │ │ ├── AppConfiguration.swift │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ ├── AccentColor.colorset │ │ │ │ └── Contents.json │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── HomeViewController.swift │ │ ├── Info.plist │ │ ├── SceneDelegate.swift │ │ └── WkWebViewController.swift │ └── WkWebView DemoUITests │ │ ├── Info.plist │ │ └── WkWebView_DemoUITests.swift ├── meeting │ ├── .eslintrc.json │ ├── .gitignore │ ├── CONTRIBUTING.md │ ├── README.MD │ ├── app │ │ └── meeting.html │ ├── package-lock.json │ ├── package.json │ ├── scripts │ │ └── setup-chime-react-submodule.js │ ├── server.js │ ├── serverless │ │ ├── .gitignore │ │ ├── deploy.js │ │ ├── src │ │ │ ├── handlers.js │ │ │ ├── index.js │ │ │ ├── package-lock.json │ │ │ └── package.json │ │ └── template.yaml │ ├── src │ │ ├── app.tsx │ │ ├── components │ │ │ ├── ActivityBar │ │ │ │ └── index.tsx │ │ │ ├── Card │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ │ ├── DeviceSelection │ │ │ │ ├── CameraDevices │ │ │ │ │ ├── BackgroundReplacementDropdown.tsx │ │ │ │ │ ├── VideoTransformDropdown.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── MicrophoneDevices │ │ │ │ │ ├── MicrophoneActivityPreview.tsx │ │ │ │ │ ├── MicrophoneActivityPreviewBar.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── SpeakerDevices │ │ │ │ │ └── index.tsx │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ │ ├── MediaStatsList │ │ │ │ ├── MetricItem.tsx │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ │ ├── MeetingControls │ │ │ │ └── VideoInputTransformControl.tsx │ │ │ ├── RemoteVideo.tsx │ │ │ ├── RosterAttendeeWrapper.tsx │ │ │ ├── SIPMeetingForm │ │ │ │ └── index.tsx │ │ │ ├── VideoTileGrid │ │ │ │ ├── Styled.tsx │ │ │ │ └── VideoTileGrid.tsx │ │ │ └── icons │ │ │ │ ├── FeaturedLayout.tsx │ │ │ │ ├── GalleryLayout.tsx │ │ │ │ └── Spinner │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ ├── constants │ │ │ ├── index.ts │ │ │ └── routes.ts │ │ ├── containers │ │ │ ├── Chat │ │ │ │ ├── ChatInput.tsx │ │ │ │ ├── Messages.tsx │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ │ ├── DevicePermissionControl │ │ │ │ ├── DevicePermissionControl.tsx │ │ │ │ └── Styled.tsx │ │ │ ├── DevicePermissionPrompt.tsx │ │ │ ├── DynamicMeetingControls │ │ │ │ ├── Styled.ts │ │ │ │ └── index.tsx │ │ │ ├── EndMeetingControl │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ │ ├── LocalMediaStreamMetrics │ │ │ │ └── index.tsx │ │ │ ├── MeetingControls │ │ │ │ ├── Styled.ts │ │ │ │ └── index.tsx │ │ │ ├── MeetingDetails │ │ │ │ ├── Styled.ts │ │ │ │ └── index.tsx │ │ │ ├── MeetingEventObserver │ │ │ │ └── index.tsx │ │ │ ├── MeetingForm │ │ │ │ ├── RegionSelection.tsx │ │ │ │ └── index.tsx │ │ │ ├── MeetingFormSelector │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ │ ├── MeetingJoinDetails.tsx │ │ │ ├── MeetingProviderWrapper │ │ │ │ └── index.tsx │ │ │ ├── MeetingRoster.tsx │ │ │ ├── MeetingStatusNotifier │ │ │ │ └── index.tsx │ │ │ ├── Navigation │ │ │ │ ├── NavigationControl.tsx │ │ │ │ └── index.tsx │ │ │ ├── NoMeetingRedirect.tsx │ │ │ ├── Notifications.tsx │ │ │ ├── SIPMeeting │ │ │ │ └── index.tsx │ │ │ ├── SIPURI │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ │ └── VideoStreamMetrics │ │ │ │ └── index.tsx │ │ ├── hooks │ │ │ ├── useMeetingEndRedirect.tsx │ │ │ └── useToggle.tsx │ │ ├── index.tsx │ │ ├── meetingConfig.ts │ │ ├── providers │ │ │ ├── AppStateProvider.tsx │ │ │ ├── DataMessagesProvider │ │ │ │ ├── index.tsx │ │ │ │ └── state.tsx │ │ │ ├── ErrorProvider.tsx │ │ │ ├── NavigationProvider.tsx │ │ │ ├── SIPMeetingProvider │ │ │ │ ├── SIPMeetingManager.ts │ │ │ │ └── index.tsx │ │ │ └── VideoTileGridProvider │ │ │ │ ├── Utils.ts │ │ │ │ ├── index.tsx │ │ │ │ └── state.tsx │ │ ├── style.css │ │ ├── theme │ │ │ └── demoTheme.ts │ │ ├── types │ │ │ └── index.ts │ │ ├── utils │ │ │ ├── TestSound.tsx │ │ │ ├── VersionLabel.tsx │ │ │ ├── api.ts │ │ │ ├── background-replacement-image.ts │ │ │ ├── background-replacement.ts │ │ │ ├── select-options-format.ts │ │ │ └── use-memo-compare.ts │ │ └── views │ │ │ ├── DeviceSetup │ │ │ ├── Styled.ts │ │ │ └── index.tsx │ │ │ ├── Home │ │ │ ├── Styled.ts │ │ │ └── index.tsx │ │ │ ├── Meeting │ │ │ ├── Styled.ts │ │ │ └── index.tsx │ │ │ └── index.tsx │ ├── tsconfig.json │ ├── webpack.config.dev.js │ └── webpack.config.js ├── moderated-chat-and-sentiment-analysis │ ├── .babelrc │ ├── .eslintrc │ ├── .prettierrc │ ├── README.md │ ├── app │ │ └── chat.html │ ├── backend │ │ ├── appconfig.json │ │ ├── samconfig.toml │ │ └── template.yaml │ ├── images │ │ ├── basic-authentication.png │ │ ├── join-screen.png │ │ ├── moderator.png │ │ ├── reaction.png │ │ ├── redacted.png │ │ ├── redaction-of-PII.png │ │ └── remove-from-chat.png │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── Chat.css │ │ ├── Chat.jsx │ │ ├── Config.js │ │ ├── api │ │ │ └── ChimeAPI.js │ │ ├── components │ │ │ ├── Authenticated │ │ │ │ └── index.jsx │ │ │ ├── Input │ │ │ │ ├── index.jsx │ │ │ │ └── style.css │ │ │ ├── Messages │ │ │ │ ├── index.jsx │ │ │ │ └── style.css │ │ │ ├── Notifications │ │ │ │ └── index.jsx │ │ │ ├── SentimentAnalysis │ │ │ │ ├── index.jsx │ │ │ │ └── style.css │ │ │ └── SentimentReaction │ │ │ │ ├── index.jsx │ │ │ │ └── style.css │ │ ├── constants │ │ │ └── routes.jsx │ │ ├── index.js │ │ ├── providers │ │ │ ├── AuthProvider.jsx │ │ │ └── ChatMessagesProvider.jsx │ │ ├── services │ │ │ └── MessagingService.js │ │ ├── utilities │ │ │ ├── getReactionEmoji.jsx │ │ │ ├── insertDateHeaders.jsx │ │ │ └── styles.css │ │ └── views │ │ │ ├── Channel │ │ │ ├── index.jsx │ │ │ └── style.css │ │ │ └── JoinChannel │ │ │ ├── index.jsx │ │ │ └── style.css │ └── webpack.config.js ├── real-time-collaboration │ ├── .gitignore │ ├── README.md │ ├── backend │ │ ├── appconfig.json │ │ ├── samconfig.toml │ │ └── template.yaml │ ├── examples │ │ └── text-editor │ │ │ ├── .eslintignore │ │ │ ├── .eslintrc.js │ │ │ ├── README.md │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── src │ │ │ ├── Config.js │ │ │ ├── index.css │ │ │ ├── index.html │ │ │ └── index.ts │ │ │ ├── tsconfig.json │ │ │ └── webpack.config.js │ ├── lerna.json │ ├── package-lock.json │ ├── package.json │ ├── packages │ │ ├── build-tools │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ └── tsconfig.json │ │ ├── eslint-config │ │ │ ├── eslint.js │ │ │ └── package.json │ │ └── y-chime-messaging │ │ │ ├── .eslintignore │ │ │ ├── .eslintrc.js │ │ │ ├── README.md │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── src │ │ │ ├── channel.ts │ │ │ ├── index.ts │ │ │ ├── messagingProvider.ts │ │ │ └── utils.ts │ │ │ ├── tsconfig.esnext.json │ │ │ └── tsconfig.json │ ├── server │ │ ├── AppInstanceLambda │ │ │ ├── cfn-response.js │ │ │ └── index.js │ │ ├── CreateChannel │ │ │ └── index.js │ │ └── CreateUser │ │ │ └── index.js │ └── tsfmt.json ├── telehealth-widget │ ├── .gitignore │ ├── HOW-THE-DEMO-WORKS.md │ ├── README.md │ ├── backend │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── bin │ │ │ └── cdk.ts │ │ ├── cdk.json │ │ ├── lambda │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── create-app-instance.ts │ │ │ │ ├── create-appointment.ts │ │ │ │ ├── create-attendee.ts │ │ │ │ ├── create-meeting.ts │ │ │ │ ├── create-pstn.ts │ │ │ │ ├── create-user-for-cognito.ts │ │ │ │ ├── delete-app-instance.ts │ │ │ │ ├── delete-appointment.ts │ │ │ │ ├── delete-sfn-executions.ts │ │ │ │ ├── delete-sip-resources.ts │ │ │ │ ├── handle-telephony-events.ts │ │ │ │ ├── make-outbound-call.ts │ │ │ │ ├── process-presence.ts │ │ │ │ ├── send-sms-message.ts │ │ │ │ └── utils │ │ │ │ │ └── index.ts │ │ │ └── tsconfig.json │ │ ├── lib │ │ │ ├── appointment.ts │ │ │ ├── cdk-stack.ts │ │ │ ├── cognito.ts │ │ │ ├── distribution.ts │ │ │ ├── meeting.ts │ │ │ ├── messaging.ts │ │ │ ├── notification.ts │ │ │ ├── presence.ts │ │ │ └── pstn.ts │ │ ├── package-lock.json │ │ ├── package.json │ │ └── tsconfig.json │ ├── frontend │ │ ├── .gitignore │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ ├── scripts │ │ │ ├── deploy.ts │ │ │ ├── template.js │ │ │ └── tsconfig.json │ │ ├── src │ │ │ ├── components │ │ │ │ ├── AppointmentList.css │ │ │ │ ├── AppointmentList.tsx │ │ │ │ ├── AppointmentView.css │ │ │ │ ├── AppointmentView.tsx │ │ │ │ ├── Chat.css │ │ │ │ ├── Chat.tsx │ │ │ │ ├── ChatInput.css │ │ │ │ ├── ChatInput.tsx │ │ │ │ ├── ChatMessage.css │ │ │ │ ├── ChatMessage.tsx │ │ │ │ ├── CreateAppointment.css │ │ │ │ ├── CreateAppointment.tsx │ │ │ │ ├── MeetingDoctorView.css │ │ │ │ ├── MeetingDoctorView.tsx │ │ │ │ ├── MeetingPatientView.css │ │ │ │ ├── MeetingPatientView.tsx │ │ │ │ ├── MeetingWidget.css │ │ │ │ ├── MeetingWidget.tsx │ │ │ │ ├── RemoteAttendeeVideo.css │ │ │ │ ├── RemoteAttendeeVideo.tsx │ │ │ │ ├── SignInSignUp.css │ │ │ │ ├── SignInSignUp.tsx │ │ │ │ ├── Spinner.css │ │ │ │ ├── Spinner.tsx │ │ │ │ ├── VideoPlaceholder.css │ │ │ │ ├── VideoPlaceholder.tsx │ │ │ │ ├── Widget.css │ │ │ │ ├── Widget.tsx │ │ │ │ ├── Window.css │ │ │ │ └── Window.tsx │ │ │ ├── constants │ │ │ │ └── index.ts │ │ │ ├── hooks │ │ │ │ ├── useInterval.tsx │ │ │ │ ├── useMeetingFunctions.tsx │ │ │ │ └── useMountedRef.ts │ │ │ ├── index.css │ │ │ ├── index.tsx │ │ │ ├── localization │ │ │ │ ├── en.json │ │ │ │ └── index.ts │ │ │ ├── providers │ │ │ │ ├── AppStateProvider.tsx │ │ │ │ ├── AuthProvider.tsx │ │ │ │ ├── AwsClientProvider.tsx │ │ │ │ ├── MessagingProvider.tsx │ │ │ │ └── RouteProvider.tsx │ │ │ ├── react-app-env.d.ts │ │ │ ├── reportWebVitals.ts │ │ │ ├── types │ │ │ │ ├── index.ts │ │ │ │ └── lambda.ts │ │ │ └── utils │ │ │ │ ├── Config.ts │ │ │ │ └── configureAmplify.ts │ │ └── tsconfig.json │ ├── github-assets │ │ ├── appointment.png │ │ ├── audio-video-meeting.png │ │ ├── audip-video-meeting-patient.png │ │ ├── auth.png │ │ ├── chat.png │ │ ├── phone-call-doctor.png │ │ ├── phone-call-patient.png │ │ ├── sms-notification.png │ │ ├── solution-blog-post-architecture.png │ │ └── widget-architecture.png │ └── package.json └── televisit-demo │ ├── README.md │ ├── backend │ ├── README.md │ ├── createattendee │ │ ├── index.js │ │ └── package.json │ ├── createmeeting │ │ ├── index.js │ │ └── package.json │ ├── dependencies │ │ └── package.json │ ├── endmeeting │ │ ├── index.js │ │ └── package.json │ ├── messagemoderator │ │ ├── ChimeMessagingAPI.js │ │ ├── index.js │ │ └── package.json │ ├── samconfig.toml │ ├── signinhook │ │ ├── index.js │ │ └── package.json │ ├── startrecording │ │ ├── index.js │ │ └── package.json │ ├── starttranscript │ │ ├── index.js │ │ └── package.json │ ├── stoprecording │ │ ├── index.js │ │ └── package.json │ ├── template.yaml │ └── usercreds │ │ ├── index.js │ │ └── package.json │ ├── deploy.sh │ ├── frontend │ ├── .babelrc │ ├── README.md │ ├── app │ │ └── chat.html │ ├── check-version.js │ ├── eslintrc.json │ ├── package.json │ ├── samconfig.toml │ ├── src │ │ ├── Chat.css │ │ ├── Chat.jsx │ │ ├── Config.js │ │ ├── api │ │ │ └── ChimeAPI.js │ │ ├── components │ │ │ ├── ActivityBar │ │ │ │ └── index.tsx │ │ │ ├── Authenticated.js │ │ │ ├── Card │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ │ ├── ChannelModals │ │ │ │ ├── AddMemberModal.jsx │ │ │ │ ├── AddModeratorsChannelModal.jsx │ │ │ │ ├── BanModal.jsx │ │ │ │ ├── ChannelModals.css │ │ │ │ ├── DeleteChannelModal.jsx │ │ │ │ ├── EditChannelModal.jsx │ │ │ │ ├── JoinMeetingModal.jsx │ │ │ │ ├── LeaveChannelModal.jsx │ │ │ │ ├── ManageMembersModal.jsx │ │ │ │ ├── NewChannelModal.css │ │ │ │ ├── NewChannelModal.jsx │ │ │ │ ├── RecordMeetingModal.jsx │ │ │ │ ├── ViewChannelDetailsModal.jsx │ │ │ │ ├── ViewMembersModal.jsx │ │ │ │ └── index.jsx │ │ │ ├── ContactPicker │ │ │ │ └── index.js │ │ │ └── DeviceSelection │ │ │ │ ├── CameraDevices │ │ │ │ └── index.tsx │ │ │ │ ├── MicrophoneDevices │ │ │ │ ├── MicrophoneActivityPreview.tsx │ │ │ │ ├── MicrophoneActivityPreviewBar.tsx │ │ │ │ └── index.tsx │ │ │ │ ├── SpeakerDevices │ │ │ │ └── index.tsx │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ ├── constants │ │ │ ├── index.ts │ │ │ └── routes.jsx │ │ ├── containers │ │ │ ├── EndMeetingControl │ │ │ │ ├── Styled.tsx │ │ │ │ └── index.tsx │ │ │ ├── MeetingChat.jsx │ │ │ ├── MeetingControls │ │ │ │ ├── Styled.ts │ │ │ │ └── index.tsx │ │ │ ├── MeetingDetails │ │ │ │ ├── Styled.ts │ │ │ │ └── index.tsx │ │ │ ├── MeetingJoinDetails.tsx │ │ │ ├── MeetingMetrics │ │ │ │ ├── Styled.ts │ │ │ │ └── index.tsx │ │ │ ├── MeetingRoster.tsx │ │ │ ├── Navigation │ │ │ │ ├── NavigationControl.tsx │ │ │ │ └── index.tsx │ │ │ ├── NoMeetingRedirect.tsx │ │ │ ├── Notifications │ │ │ │ └── index.jsx │ │ │ ├── channels │ │ │ │ ├── ChannelsWrapper.css │ │ │ │ ├── ChannelsWrapper.jsx │ │ │ │ └── ModalManager.jsx │ │ │ ├── input │ │ │ │ ├── Input.css │ │ │ │ └── Input.jsx │ │ │ ├── login │ │ │ │ ├── Login.jsx │ │ │ │ └── login.css │ │ │ ├── messages │ │ │ │ ├── AttachmentProcessor.jsx │ │ │ │ ├── Messages.css │ │ │ │ └── Messages.jsx │ │ │ └── transcriptions │ │ │ │ ├── AnalysisPane.js │ │ │ │ ├── AnalysisPane.module.css │ │ │ │ ├── DeleteIcon.js │ │ │ │ ├── InProgressTranscriptLine.js │ │ │ │ ├── InProgressTranscriptLine.module.css │ │ │ │ ├── LiveTranscription.jsx │ │ │ │ ├── SOAPReviewPane.js │ │ │ │ ├── SOAPReviewPane.module.css │ │ │ │ ├── TranscriptAnalysisPane.js │ │ │ │ ├── TranscriptLine.js │ │ │ │ ├── TranscriptLine.module.css │ │ │ │ ├── TranscriptPane.js │ │ │ │ ├── TranscriptPane.module.css │ │ │ │ ├── conceptUtils.js │ │ │ │ ├── detectEntities.ts │ │ │ │ ├── displayNames.js │ │ │ │ ├── inferICD10CM.ts │ │ │ │ ├── inferRxNorm.ts │ │ │ │ ├── soapSummary.js │ │ │ │ ├── transcriptHighlights.js │ │ │ │ ├── transcriptHighlights.module.css │ │ │ │ ├── useComprehension.js │ │ │ │ └── useTranslation.js │ │ ├── hooks │ │ │ └── useMeetingEndRedirect.tsx │ │ ├── index.js │ │ ├── providers │ │ │ ├── AppStateProvider.jsx │ │ │ ├── AuthProvider.jsx │ │ │ ├── ChatMessagesProvider │ │ │ │ └── index.jsx │ │ │ ├── IdentityProvider.jsx │ │ │ ├── NavigationProvider.tsx │ │ │ └── UserPermissionProvider.jsx │ │ ├── services │ │ │ ├── AttachmentService.js │ │ │ ├── IdentityService.js │ │ │ ├── MessagingService.js │ │ │ └── servicesConfig.js │ │ ├── utilities │ │ │ ├── TestSound.tsx │ │ │ ├── arnParser.js │ │ │ ├── formatBytes.js │ │ │ ├── insertDateHeaders.jsx │ │ │ ├── mergeArrays.js │ │ │ └── styles.css │ │ └── views │ │ │ ├── Channels │ │ │ ├── index.jsx │ │ │ └── style.css │ │ │ ├── DeviceSetup │ │ │ ├── Styled.ts │ │ │ └── index.tsx │ │ │ ├── Meeting │ │ │ ├── Styled.ts │ │ │ └── index.tsx │ │ │ └── Signin │ │ │ └── index.jsx │ ├── template.yaml │ ├── tsconfig.json │ └── webpack.config.js │ └── images │ ├── backendoutputs.png │ ├── chatbot.png │ ├── chime-sdk-telemedicine.jpg │ ├── confirmuser.png │ ├── meeting.png │ └── newregistration.png ├── lambda └── call-insights-parsing │ ├── README.md │ └── docker │ ├── Dockerfile │ ├── app.py │ └── requirements.txt ├── package-lock.json └── utils ├── pstn-audio-lambdas └── amazon-chime-pstn-audio-lambda-node │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── app.js │ └── template.yaml └── singlejs ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── rollup.config.js └── src └── index.js /.github/ISSUE_TEMPLATE/documentation-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation Request 3 | about: Need help setting up one of the demos? Spot an error in our documentation? Let us know how our documentation 4 | can be improved. 5 | title: '' 6 | labels: Documentation 7 | assignees: '' 8 | 9 | --- 10 | 11 | ### What demo do you have issue with? 12 | 13 | *For example: I'm trying to setup the meeting demo app.* 14 | 15 | ### How can the documentation be improved to help your use case? 16 | 17 | *For example: Include a section on how to configure a demo CloudFormation resources.* 18 | 19 | ### What documentation have you looked at so far? 20 | 21 | *For example: README.md, etc.* -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Issue #:** 2 | 3 | **Description of changes:** 4 | 5 | **Testing** 6 | 7 | 1. How did you test these changes? 8 | 2. Can these changes be tested using one of the demo application? If yes, which demo application can be used to test it? 9 | 3. If applicable, have you run `npm run build` successfully locally to fix all warnings and errors? 10 | 11 | By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | dist 4 | build 5 | .idea 6 | apps/chat/src/Config.js 7 | apps/chat/src/backend/serverless/appconfig.json 8 | apps/chat/src/backend/serverless/.aws-sam 9 | apps/real-time-collaboration/backend/.aws-sam 10 | apps/moderated-chat-and-sentiment-analysis/backend/.aws-sam/ 11 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "amazon-chime-sdk-component-library-react"] 2 | path = amazon-chime-sdk-component-library-react 3 | url = https://github.com/aws/amazon-chime-sdk-component-library-react.git 4 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # These owners will be the default owners for everything in 2 | # amazon-chime-sdk repo. 3 | # Check below link for more information: 4 | # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners 5 | * @aws-samples/amazon-chime-sdk-js-dev 6 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | amazon-chime-sdk 2 | Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. -------------------------------------------------------------------------------- /analytics/meeting-event-dashboard/README.md: -------------------------------------------------------------------------------- 1 | # Amazon Chime SDK Meeting Event Dashboard 2 | 3 | This package contains the AWS CloudFormation template for the [Monitoring and troubleshooting with Amazon Chime SDK meeting events](https://aws.amazon.com/blogs/business-productivity/monitoring-and-troubleshooting-with-amazon-chime-sdk-meeting-events/) blog post on the AWS Business Productivity Blog. 4 | Follow the instructions in the blog post to create your Amazon CloudWatch dashboard. -------------------------------------------------------------------------------- /apps/amplify-demo/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /.pnp 5 | .pnp.js 6 | 7 | # testing 8 | /coverage 9 | 10 | # misc 11 | .vscode 12 | .graphqlconfig.yml 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | 23 | # amplify 24 | src/react-app-env.d.ts 25 | src/graphql 26 | src/API.ts 27 | amplify/ 28 | 29 | #amplify-do-not-edit-begin 30 | amplify/\#current-cloud-backend 31 | amplify/.config/local-* 32 | amplify/logs 33 | amplify/mock-data 34 | amplify/backend/amplify-meta.json 35 | amplify/backend/.temp 36 | build/ 37 | dist/ 38 | node_modules/ 39 | aws-exports.js 40 | awsconfiguration.json 41 | amplifyconfiguration.json 42 | amplifyconfiguration.dart 43 | amplify-build-config.json 44 | amplify-gradle-config.json 45 | amplifytools.xcconfig 46 | .secret-* 47 | **.sample 48 | #amplify-do-not-edit-end 49 | -------------------------------------------------------------------------------- /apps/amplify-demo/public/architecture_diagram.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/amplify-demo/public/architecture_diagram.jpg -------------------------------------------------------------------------------- /apps/amplify-demo/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Amazon Chime SDK Amplify Demo 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /apps/amplify-demo/src/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import ReactDOM from 'react-dom'; 5 | import { ThemeProvider } from 'styled-components'; 6 | import { MeetingProvider, lightTheme } from 'amazon-chime-sdk-component-library-react'; 7 | import Meeting from './components/Meeting'; 8 | import MeetingForm from './components/MeetingForm'; 9 | 10 | import { Amplify } from 'aws-amplify'; 11 | import awsconfig from './aws-exports'; 12 | Amplify.configure(awsconfig); 13 | 14 | window.addEventListener('load', () => { 15 | ReactDOM.render( 16 | 17 | 18 | 19 | 20 | 21 | , 22 | document.getElementById('root') 23 | ); 24 | }); 25 | -------------------------------------------------------------------------------- /apps/amplify-demo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "esModuleInterop": true, 12 | "allowSyntheticDefaultImports": true, 13 | "strict": true, 14 | "forceConsistentCasingInFileNames": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "module": "esnext", 17 | "moduleResolution": "node", 18 | "resolveJsonModule": true, 19 | "isolatedModules": true, 20 | "noEmit": true, 21 | "jsx": "react-jsx" 22 | }, 23 | "include": [ 24 | "src" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /apps/android-webview-sample/.gitignore: -------------------------------------------------------------------------------- 1 | /.gradle/ 2 | /.idea/ 3 | /app/build/ 4 | /local.properties 5 | .DS_Store -------------------------------------------------------------------------------- /apps/android-webview-sample/app/src/main/java/com/amazonaws/android_webview_sample/AppConfig.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * AppConfig.kt 3 | * Android WebView Sample Demo 4 | * 5 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | * SPDX-License-Identifier: MIT-0 7 | */ 8 | package com.amazonaws.android_webview_sample 9 | 10 | object AppConfig { 11 | // PUT YOUR MEETING URL HERE 12 | var url = "PLACEHOLDER" 13 | } -------------------------------------------------------------------------------- /apps/android-webview-sample/app/src/main/res/layout/fragment_webview.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 18 | 22 | -------------------------------------------------------------------------------- /apps/android-webview-sample/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | #FF6200EE 12 | #FF3700B3 13 | #FF03DAC5 14 | #FF018786 15 | #FF000000 16 | #FFFFFFFF 17 | -------------------------------------------------------------------------------- /apps/android-webview-sample/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | Android WebView Sample 11 | 12 | Main Fragment 13 | Webview Fragment 14 | Go to Webview 15 | -------------------------------------------------------------------------------- /apps/android-webview-sample/app/src/main/res/xml/backup_descriptor.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /apps/android-webview-sample/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/android-webview-sample/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /apps/android-webview-sample/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # gradle-wrapper.properties 3 | # Android WebView Sample Demo 4 | # 5 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | # SPDX-License-Identifier: MIT-0 7 | # 8 | 9 | #Thu Jul 15 14:40:02 PDT 2021 10 | distributionBase=GRADLE_USER_HOME 11 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip 12 | distributionPath=wrapper/dists 13 | zipStorePath=wrapper/dists 14 | zipStoreBase=GRADLE_USER_HOME 15 | -------------------------------------------------------------------------------- /apps/android-webview-sample/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * settings.gradle 3 | * Android WebView Sample Demo 4 | * 5 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | * SPDX-License-Identifier: MIT-0 7 | */ 8 | 9 | rootProject.name = "Android-WKWevView-sample" 10 | include ':app' 11 | -------------------------------------------------------------------------------- /apps/chat-android/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle/ 2 | .idea/ 3 | local.properties 4 | build/ 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/common/AppConstants.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdkdemo.common 7 | 8 | const val EMPTY_STRING = "" 9 | 10 | // Keys for navigation 11 | const val SESSION_ID = "SessionId" 12 | const val USER_DETAILS = "UserDetails" 13 | const val USER_CREDENTIALS = "UserCredentials" 14 | const val CHANNEL_ARN = "ChannelArn" 15 | const val USERNAME_KEY = "USERNAME" 16 | const val PASSWORD_KEY = "PASSWORD" 17 | const val DEVICE_TOKEN_KEY = "DEVICE_TOKEN" 18 | const val APP_INSTANCE_USER_NOT_FOUND = "AppInstanceUser NotFound in SharedPrefs" 19 | const val APP_INSTANCE_USER_ENDPOINT_TYPE = "GCM" 20 | 21 | const val MESSAGING_SERVICE_REGION = "us-east-1" 22 | const val APP_INSTANCE_ARN = "appInstanceArn" 23 | const val API_GATEWAY_INVOKE_URL = "apiGatewayInvokeUrl" 24 | const val PINPOINT_APPLICATION_ARN = "pinpointApplicationArn" 25 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/common/coroutine/CoroutineContextProvider.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdkdemo.common.coroutine 7 | 8 | import kotlin.coroutines.CoroutineContext 9 | import kotlinx.coroutines.Dispatchers 10 | 11 | open class CoroutineContextProvider { 12 | open val main: CoroutineContext by lazy { Dispatchers.Main } 13 | open val io: CoroutineContext by lazy { Dispatchers.IO } 14 | open val default: CoroutineContext by lazy { Dispatchers.Default } 15 | } 16 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/common/extensions/JavaExtension.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdkdemo.common.extensions 7 | 8 | import java.text.SimpleDateFormat 9 | import java.util.Date 10 | import java.util.Locale 11 | import java.util.TimeZone 12 | 13 | fun String.toDate( 14 | dateFormat: String = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", 15 | timeZone: TimeZone = TimeZone.getTimeZone("UTC") 16 | ): Date? { 17 | val parser = SimpleDateFormat(dateFormat, Locale.getDefault()) 18 | parser.timeZone = timeZone 19 | return parser.parse(this) 20 | } 21 | 22 | fun Date.formatTo(dateFormat: String, timeZone: TimeZone = TimeZone.getDefault()): String { 23 | val formatter = SimpleDateFormat(dateFormat, Locale.getDefault()) 24 | formatter.timeZone = timeZone 25 | return formatter.format(this) 26 | } 27 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/data/Channel.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdkdemo.data 7 | 8 | data class Channel( 9 | val channelArn: String, 10 | val name: String, 11 | val privacy: String, 12 | val mode: String 13 | ) 14 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/data/ChannelMessage.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdkdemo.data 7 | 8 | import java.util.Date 9 | 10 | data class ChannelMessage( 11 | val messageId: String, 12 | val senderName: String, 13 | val isLocal: Boolean, 14 | val displayTime: Date, 15 | val content: String 16 | ) 17 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/data/Result.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdkdemo.data 7 | 8 | sealed class Result 9 | data class Success(val data: T) : Result() 10 | data class Failure(val exception: Exception) : Result() 11 | object Loading : Result() 12 | 13 | inline fun Result.onSuccess(action: (T) -> Unit): Result { 14 | if (this is Success) action(data) 15 | return this 16 | } 17 | 18 | inline fun Result.onFailure(action: (Exception) -> Unit): Result { 19 | if (this is Failure) action(exception) 20 | return this 21 | } 22 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/data/User.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdkdemo.data 7 | 8 | import java.io.Serializable 9 | 10 | data class User( 11 | val chimeDisplayName: String, 12 | val chimeUserId: String, 13 | val chimeAppInstanceUserArn: String 14 | ) : Serializable 15 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/data/UserEndpoint.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdkdemo.data 7 | 8 | data class UserEndpoint( 9 | val endpointId: String, 10 | val appInstanceUserArn: String, 11 | val name: String?, 12 | val allowMessages: String 13 | ) 14 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/data/source/service/AuthService.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdkdemo.data.source.service 7 | 8 | import com.amazonaws.auth.AWSCredentials 9 | import com.amazonaws.services.chime.sdkdemo.data.Result 10 | import com.amazonaws.services.chime.sdkdemo.data.User 11 | 12 | interface AuthService { 13 | suspend fun signIn(userName: String, password: String): Result 14 | 15 | suspend fun signOut() 16 | 17 | suspend fun getCurrentUser(): Result 18 | 19 | suspend fun getAWSCredentials(): Result 20 | 21 | suspend fun exchangeTokenForAwsCredential(accessToken: String): String? 22 | } 23 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/java/com/amazonaws/services/chime/sdkdemo/ui/base/ViewState.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdkdemo.ui.base 7 | 8 | sealed class ViewState 9 | class Success(val data: T? = null) : ViewState() 10 | class Error(val error: Throwable) : ViewState() 11 | class Loading : ViewState() 12 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/drawable/bubble_my_message.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/drawable/bubble_their_message.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/drawable/button_send_message.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/menu/app_instance_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/menu/channel_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | #008577 10 | #00574B 11 | #D81B60 12 | #3f4149 13 | #FFFFFF 14 | #000000 15 | 16 | 17 | #E9E9E9 18 | #64000000 19 | 20 | -------------------------------------------------------------------------------- /apps/chat-android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 15 | 16 | -------------------------------------------------------------------------------- /apps/chat-android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /apps/chat-android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Dec 07 00:10:41 PST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip 7 | -------------------------------------------------------------------------------- /apps/chat-android/media/awsChimeSDKMessagingDemo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-android/media/awsChimeSDKMessagingDemo.png -------------------------------------------------------------------------------- /apps/chat-android/messaging-websocket/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /apps/chat-android/messaging-websocket/src/main/java/com/amazonaws/services/chime/sdk/messaging/Message.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdk.messaging 7 | 8 | data class Message( 9 | val Headers: Map, 10 | val Payload: String 11 | ) 12 | -------------------------------------------------------------------------------- /apps/chat-android/messaging-websocket/src/main/java/com/amazonaws/services/chime/sdk/messaging/internal/WebSocketAdapter.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdk.messaging.internal 7 | 8 | interface WebSocketAdapter { 9 | fun create(url: String, observer: WebSocketAdapterObserver) 10 | 11 | fun close() 12 | } 13 | -------------------------------------------------------------------------------- /apps/chat-android/messaging-websocket/src/main/java/com/amazonaws/services/chime/sdk/messaging/internal/WebSocketAdapterObserver.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdk.messaging.internal 7 | 8 | import com.amazonaws.services.chime.sdk.messaging.session.MessagingSessionStatus 9 | 10 | interface WebSocketAdapterObserver { 11 | fun onConnect() 12 | 13 | fun onMessage(message: String) 14 | 15 | fun onClose(status: MessagingSessionStatus) 16 | } 17 | -------------------------------------------------------------------------------- /apps/chat-android/messaging-websocket/src/main/java/com/amazonaws/services/chime/sdk/messaging/session/ChimeUserCredentials.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdk.messaging.session 7 | 8 | import java.io.Serializable 9 | 10 | data class ChimeUserCredentials( 11 | val accessKeyId: String, 12 | val secretAccessKey: String, 13 | val sessionToken: String? = null 14 | ) : Serializable 15 | -------------------------------------------------------------------------------- /apps/chat-android/messaging-websocket/src/main/java/com/amazonaws/services/chime/sdk/messaging/session/MessagingSession.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdk.messaging.session 7 | 8 | interface MessagingSession { 9 | fun start() 10 | 11 | fun stop() 12 | 13 | fun addMessagingSessionObserver(observer: MessagingSessionObserver) 14 | 15 | fun removeMessagingSessionObserver(observer: MessagingSessionObserver) 16 | } 17 | -------------------------------------------------------------------------------- /apps/chat-android/messaging-websocket/src/main/java/com/amazonaws/services/chime/sdk/messaging/session/MessagingSessionConfiguration.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdk.messaging.session 7 | 8 | import kotlin.random.Random 9 | import kotlin.random.nextUInt 10 | 11 | data class MessagingSessionConfiguration( 12 | val userArn: String, 13 | val endpointUrl: String, 14 | val region: String, 15 | val credentials: ChimeUserCredentials, 16 | val messagingSessionId: String = Random.nextUInt().toString() 17 | ) 18 | -------------------------------------------------------------------------------- /apps/chat-android/messaging-websocket/src/main/java/com/amazonaws/services/chime/sdk/messaging/session/MessagingSessionObserver.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdk.messaging.session 7 | 8 | import com.amazonaws.services.chime.sdk.messaging.Message 9 | 10 | interface MessagingSessionObserver { 11 | fun onMessagingSessionStarted() 12 | 13 | fun onMessagingSessionConnecting(reconnecting: Boolean) 14 | 15 | fun onMessagingSessionStopped(status: MessagingSessionStatus) 16 | 17 | fun onMessagingSessionReceivedMessage(message: Message) 18 | } 19 | -------------------------------------------------------------------------------- /apps/chat-android/messaging-websocket/src/main/java/com/amazonaws/services/chime/sdk/messaging/session/MessagingSessionStatus.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdk.messaging.session 7 | 8 | class MessagingSessionStatus( 9 | val code: Int?, 10 | val reason: String? 11 | ) 12 | -------------------------------------------------------------------------------- /apps/chat-android/messaging-websocket/src/main/java/com/amazonaws/services/chime/sdk/messaging/utils/SigV4.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdk.messaging.utils 7 | 8 | interface SigV4 { 9 | 10 | fun signURL( 11 | method: String, 12 | scheme: String, 13 | serviceName: String, 14 | hostname: String, 15 | path: String, 16 | payload: String, 17 | queryParams: Map>? 18 | ): String 19 | } 20 | -------------------------------------------------------------------------------- /apps/chat-android/messaging-websocket/src/main/java/com/amazonaws/services/chime/sdk/messaging/utils/logger/LogLevel.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | package com.amazonaws.services.chime.sdk.messaging.utils.logger 7 | 8 | enum class LogLevel(val priority: Int) { 9 | VERBOSE(0), 10 | DEBUG(1), 11 | INFO(2), 12 | WARN(3), 13 | ERROR(4), 14 | OFF(5) 15 | } 16 | -------------------------------------------------------------------------------- /apps/chat-android/messaging-websocket/version.properties: -------------------------------------------------------------------------------- 1 | versionMajor=0 2 | versionMinor=1 3 | versionPatch=0 4 | -------------------------------------------------------------------------------- /apps/chat-android/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Running git pre-commit hook" 4 | 5 | ./gradlew ktlintCheck 6 | 7 | RESULT=$? 8 | 9 | [ $RESULT -ne 0 ] && exit 1 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /apps/chat-android/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | include ':app', ':messaging-websocket' 7 | rootProject.name='amazon-chime-sdk-messaging-demo-app' 8 | -------------------------------------------------------------------------------- /apps/chat-ios/.gitignore: -------------------------------------------------------------------------------- 1 | Pods 2 | xcuserdata 3 | **/IDEWorkspaceChecks.plist 4 | .DS_Store 5 | Podfile.lock 6 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/AmazonChimeSDKMessagingDemo.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/AppConfiguration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppConfiguration.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | import Foundation 10 | 11 | struct AppConfiguration { 12 | static let region = "us-east-1" 13 | static let appInstanceArn = "APP_INSTANCE_ARN" 14 | static let apiGatewayInvokeUrl = "API_GATEWAY_INVOKE_URL" 15 | static let pinpointAppArn = "PINPOINT_APPLICATION_ARN" 16 | } 17 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/entity/ChatMessage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatMessage.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | import UIKit 10 | 11 | struct ChatMessage { 12 | let senderName: String 13 | let content: String 14 | let displayTime: String 15 | let isSelf: Bool 16 | let imageUrl: URL? 17 | var displayAttachmentHolder: Bool = false 18 | } 19 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/entity/CredentialExchangeResponse.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CredentialExchangeResponse.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | import AWSPluginsCore 10 | import Foundation 11 | 12 | struct CredentialExchangeResponse: Codable { 13 | let chimeDisplayName: String 14 | let chimeCredentials: ChimeUserCredentials 15 | let chimeUserId: String 16 | let chimeAppInstanceUserArn: String 17 | 18 | enum CodingKeys: String, CodingKey { 19 | case chimeDisplayName = "ChimeDisplayName" 20 | case chimeCredentials = "ChimeCredentials" 21 | case chimeUserId = "ChimeUserId" 22 | case chimeAppInstanceUserArn = "ChimeAppInstanceUserArn" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/entity/Message.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Message.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | import Foundation 10 | 11 | @objcMembers public class Message: NSObject, Codable { 12 | let headers: [String: String] 13 | let payload: String? 14 | 15 | enum CodingKeys: String, CodingKey { 16 | case headers = "Headers" 17 | case payload = "Payload" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/entity/NotificationLevel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NotificationLevel.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | struct NotificationLevel { 10 | let title: String 11 | let subtitle: String 12 | let icon: String? = nil 13 | } 14 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/entity/User.swift: -------------------------------------------------------------------------------- 1 | // 2 | // User.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | struct User { 10 | let chimeDisplayName: String 11 | let chimeUserId: String 12 | let chimeAppInstanceUserArn: String 13 | } 14 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/messaging-websocket/internal/WebSocketAdapter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebSocketAdapter.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | public protocol WebSocketAdapter { 10 | func connect(url: String, observer: WebSocketAdapterObserver) 11 | 12 | func close() 13 | } 14 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/messaging-websocket/internal/WebSocketAdapterObserver.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WebSocketAdapterObserver.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | public protocol WebSocketAdapterObserver { 10 | func onConnect() 11 | 12 | func onMessage(message: String) 13 | 14 | func onClose(status: MessagingSessionStatus) 15 | } 16 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/messaging-websocket/session/ChimeUserCredentials.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChimeUserCredentials.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | import Foundation 10 | 11 | struct ChimeUserCredentials: Codable { 12 | let accessKeyId: String 13 | let secretAccessKey: String 14 | let sessionToken: String 15 | 16 | enum CodingKeys: String, CodingKey { 17 | case accessKeyId = "AccessKeyId" 18 | case secretAccessKey = "SecretAccessKey" 19 | case sessionToken = "SessionToken" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/messaging-websocket/session/MessagingSession.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessagingSession.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | import Foundation 9 | 10 | @objc public protocol MessagingSession { 11 | func start() 12 | 13 | func stop() 14 | 15 | func addMessagingSessionObserver(observer: MessagingSessionObserver) 16 | 17 | func removeMessagingSessionObserver(observer: MessagingSessionObserver) 18 | } 19 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/messaging-websocket/session/MessagingSessionConfiguration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessagingSessionConfiguration.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | import Foundation 10 | 11 | struct MessagingSessionConfiguration { 12 | var userArn: String 13 | var endpointUrl: String 14 | var region: String 15 | var credentials: ChimeUserCredentials 16 | var messagingSessionId: String = UUID().uuidString 17 | } 18 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/messaging-websocket/session/MessagingSessionObserver.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessagingSessionObserver.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | import Foundation 10 | 11 | @objc public protocol MessagingSessionObserver { 12 | 13 | func onMessagingSessionStarted() 14 | 15 | func onMessagingSessionConnecting(reconnecting: Bool) 16 | 17 | func onMessagingSessionStopped(status: MessagingSessionStatus) 18 | 19 | func onMessagingSessionMessageReceived(message: Message) 20 | } 21 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/messaging-websocket/session/MessagingSessionStatus.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessagingSessionStatus.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | import Foundation 10 | 11 | @objcMembers public class MessagingSessionStatus: NSObject { 12 | public let code: Int 13 | public let reason: String 14 | 15 | public init(code: Int, reason: String) { 16 | self.code = code 17 | self.reason = reason 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/messaging-websocket/utils/ObserverUtils.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ObserverUtils.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | import Foundation 10 | 11 | @objcMembers class ObserverUtils: NSObject { 12 | public static func forEach( 13 | observers: ConcurrentMutableSet, 14 | observerFunction: @escaping (_ observer: T) -> Void 15 | ) { 16 | DispatchQueue.main.async { 17 | observers.forEach { observer in 18 | if let observer = observer as? T { 19 | observerFunction(observer) 20 | } 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /apps/chat-ios/AmazonChimeSDKMessagingDemo/messaging-websocket/utils/SigV4.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SigV4.swift 3 | // AmazonChimeSDKMessagingDemo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | import Foundation 10 | 11 | public protocol SigV4 { 12 | func signUrl(method: String, 13 | scheme: String, 14 | serviceName: String, 15 | hostname: String, 16 | path: String, 17 | payload: String, 18 | queryParams: [String: String]) -> String 19 | } 20 | -------------------------------------------------------------------------------- /apps/chat-ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'AmazonChimeSDKMessagingDemo' do 5 | # Comment the next line if you don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for AmazonChimeSDKMessagingDemo 9 | pod 'Amplify' 10 | pod 'AmplifyPlugins/AWSS3StoragePlugin' 11 | pod 'AmplifyPlugins/AWSCognitoAuthPlugin' 12 | pod 'AWSChimeSDKMessaging' 13 | pod 'AWSChimeSDKIdentity' 14 | pod 'Starscream', '~> 4.0.0' 15 | 16 | end 17 | -------------------------------------------------------------------------------- /apps/chat-ios/media/awsChimeSDKMessagingDemo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-sdk/10d82a0c0b8347b5346fc1d27d9acb1c7f37597b/apps/chat-ios/media/awsChimeSDKMessagingDemo.png -------------------------------------------------------------------------------- /apps/chat/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["@babel/preset-env", { 4 | "useBuiltIns": "usage", 5 | "corejs": 3 6 | }], 7 | "@babel/preset-react" 8 | ], 9 | "plugins": [ 10 | "@babel/plugin-proposal-class-properties" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /apps/chat/app/chat.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Amazon Chime Chat SDK Demo 8 | 9 | 10 | 11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /apps/chat/src/Config.js: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import data from './backend/serverless/appconfig.json' 5 | const appConfigJson = Object.assign({}, ...data.map((x) => ({[x.OutputKey]: x.OutputValue}))); 6 | 7 | const appConfig = { 8 | apiGatewayInvokeUrl: '' || appConfigJson.apiGatewayInvokeUrl, 9 | cognitoUserPoolId: '' || appConfigJson.cognitoUserPoolId, 10 | cognitoAppClientId: '' || appConfigJson.cognitoAppClientId, 11 | cognitoIdentityPoolId: '' || appConfigJson.cognitoIdentityPoolId, 12 | appInstanceArn: '' || appConfigJson.appInstanceArn, 13 | region: 'us-east-1', // Only supported region for Amazon Chime SDK Messaging as of this writing 14 | attachments_s3_bucket_name: '' || appConfigJson.attachmentsS3BucketName 15 | }; 16 | export default appConfig; 17 | -------------------------------------------------------------------------------- /apps/chat/src/backend/serverless/appconfig.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /apps/chat/src/backend/serverless/samconfig.toml: -------------------------------------------------------------------------------- 1 | version = 0.1 2 | [default] 3 | [default.deploy] 4 | [default.deploy.parameters] 5 | stack_name = "chime-sdk-chat-demo" 6 | s3_prefix = "chime-sdk-chat-demo" 7 | region = "us-east-1" 8 | confirm_changeset = true 9 | capabilities = "CAPABILITY_NAMED_IAM" 10 | parameter_overrides = "DemoName=\"ChimeSDKChatDemo\"" 11 | -------------------------------------------------------------------------------- /apps/chat/src/components/ActivityBar/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | import styled from 'styled-components'; 6 | 7 | const Track = styled.div` 8 | width: 100%; 9 | height: 0.625rem; 10 | background-color: #ecf0f1; 11 | border-radius: 0.25rem; 12 | `; 13 | 14 | const Progress = styled.div` 15 | height: 0.625rem; 16 | background-color: #18bc9c; 17 | border-radius: 0.25rem; 18 | transform: scaleX(0); 19 | transform-origin: left; 20 | transition: transform 33ms ease-in-out; 21 | will-change: transform; 22 | `; 23 | 24 | const ActivityBar = React.forwardRef((props, ref: any) => ( 25 | 26 | 27 | 28 | )); 29 | 30 | export default ActivityBar; 31 | -------------------------------------------------------------------------------- /apps/chat/src/components/Card/Styled.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import styled from 'styled-components'; 5 | 6 | export const SmallText = styled.small` 7 | color: rgba(0, 0, 0, 0.5); 8 | `; 9 | 10 | export const StyledCard = styled.div` 11 | .ch-body { 12 | margin-bottom: 1rem; 13 | } 14 | 15 | .ch-header { 16 | font-size: 1.5rem; 17 | } 18 | 19 | .ch-title { 20 | font-size: 1.25rem; 21 | margin-top: 1rem; 22 | } 23 | 24 | .ch-description { 25 | margin: 1rem 0 1rem 0; 26 | } 27 | `; 28 | -------------------------------------------------------------------------------- /apps/chat/src/components/Card/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | 6 | import { SmallText, StyledCard } from './Styled'; 7 | 8 | interface CardProps extends React.HTMLAttributes { 9 | header?: string; 10 | title: string; 11 | description: any; 12 | smallText?: string; 13 | } 14 | 15 | const Card: React.FC = ({ 16 | header, 17 | title, 18 | description, 19 | smallText 20 | }: CardProps) => ( 21 | 22 | {header &&
{header}
} 23 |
24 |
{title}
25 |
{description}
26 | {smallText && {smallText}} 27 |
28 |
29 | ); 30 | 31 | export default Card; 32 | -------------------------------------------------------------------------------- /apps/chat/src/components/ChannelModals/JoinMeetingModal.css: -------------------------------------------------------------------------------- 1 | .join-modal { 2 | text-align: center; 3 | } 4 | 5 | .join-header { 6 | margin-top: 2rem; 7 | } 8 | 9 | .response-buttons{ 10 | margin: 0 auto; 11 | width: 50%; 12 | margin-top: 1rem; 13 | } 14 | 15 | .message-buttons{ 16 | margin: 0 auto; 17 | width: 28%; 18 | margin-bottom: 2rem; 19 | } 20 | 21 | .join-button{ 22 | margin: 0 0.5rem 0 5rem; 23 | background-color: #067000 !important; 24 | } 25 | 26 | .decline-button{ 27 | margin: 0 0.5rem 0 5rem; 28 | color: #ffffff !important; 29 | background-color: #c52000 !important; 30 | } -------------------------------------------------------------------------------- /apps/chat/src/components/ChannelModals/SetCustomStatusModal.css: -------------------------------------------------------------------------------- 1 | #custom-status-form { 2 | display: flex; 3 | flex-direction: column; 4 | margin-top: 1rem; 5 | } 6 | 7 | .custom-status-form-field-input { 8 | display: flex; 9 | flex-direction: row; 10 | width: 100%; 11 | margin: auto auto 10pt; 12 | } 13 | 14 | .custom-status-form-field-input-div { 15 | min-width: 50%; 16 | } 17 | 18 | .custom-status-form-field-input .lbl { 19 | display: flex; 20 | padding: 1rem 0; 21 | flex-direction: column; 22 | margin-top: 0.5rem; 23 | min-width: 10%; 24 | } 25 | 26 | .custom-status-form-field-input .value { 27 | display: flex; 28 | width: 100%; 29 | margin: auto 0; 30 | padding-top: 1rem; 31 | padding-left: 0; 32 | flex-direction: column; 33 | } 34 | 35 | .custom-status-form-field-input .max-length-lbl { 36 | display: flex; 37 | font-size: 9pt; 38 | } -------------------------------------------------------------------------------- /apps/chat/src/components/ChannelModals/index.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | export { AddMemberModal } from './AddMemberModal'; 5 | export { ManageChannelFlowModal } from './ManageChannelFlowModal'; 6 | export { DeleteChannelModal } from './DeleteChannelModal'; 7 | export { LeaveChannelModal } from './LeaveChannelModal'; 8 | export { JoinMeetingModal } from './JoinMeetingModal'; 9 | export { ManageMembersModal } from './ManageMembersModal'; 10 | export { NewChannelModal } from './NewChannelModal'; 11 | export { ViewChannelDetailsModal } from './ViewChannelDetailsModal'; 12 | export { ViewMembersModal } from './ViewMembersModal'; 13 | export { EditChannelModal } from './EditChannelModal'; 14 | export { BanModal } from './BanModal'; 15 | export { SetCustomStatusModal } from './SetCustomStatusModal'; 16 | export { ListSubChannelModel } from './ListSubChannelModel'; 17 | export { JoinSubChannelModel } from './JoinSubChannelModel'; 18 | -------------------------------------------------------------------------------- /apps/chat/src/components/DeviceSelection/CameraDevices/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | import { 6 | Heading, 7 | PreviewVideo, 8 | QualitySelection, 9 | CameraSelection, 10 | Label 11 | } from 'amazon-chime-sdk-component-library-react'; 12 | 13 | import { title, StyledInputGroup } from '../Styled'; 14 | 15 | const CameraDevices = () => { 16 | return ( 17 |
18 | 19 | Video 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 31 |
32 | ); 33 | }; 34 | 35 | export default CameraDevices; 36 | -------------------------------------------------------------------------------- /apps/chat/src/components/DeviceSelection/MicrophoneDevices/MicrophoneActivityPreview.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | import { Label } from 'amazon-chime-sdk-component-library-react'; 6 | 7 | import { StyledPreviewGroup } from '../Styled'; 8 | import MicrophoneActivityPreviewBar from './MicrophoneActivityPreviewBar'; 9 | 10 | const MicrophoneActivityPreview = () => { 11 | return ( 12 | 13 | 16 | 17 | 18 | ); 19 | }; 20 | 21 | export default MicrophoneActivityPreview; 22 | -------------------------------------------------------------------------------- /apps/chat/src/components/DeviceSelection/MicrophoneDevices/MicrophoneActivityPreviewBar.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React, { useRef } from 'react'; 5 | import { useLocalAudioInputActivityPreview } from 'amazon-chime-sdk-component-library-react'; 6 | 7 | import ActivityBar from '../../ActivityBar'; 8 | 9 | const MicrophoneActivityPreviewBar = () => { 10 | const activityBarRef = useRef(); 11 | useLocalAudioInputActivityPreview(activityBarRef); 12 | 13 | return ; 14 | }; 15 | 16 | export default MicrophoneActivityPreviewBar; 17 | -------------------------------------------------------------------------------- /apps/chat/src/components/DeviceSelection/MicrophoneDevices/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | import { 6 | Heading, 7 | MicSelection 8 | } from 'amazon-chime-sdk-component-library-react'; 9 | 10 | import { title } from '../Styled'; 11 | import MicrophoneActivityPreview from './MicrophoneActivityPreview'; 12 | 13 | const MicrophoneDevices = () => { 14 | return ( 15 |
16 | 17 | Audio 18 | 19 | 20 | 21 |
22 | ); 23 | }; 24 | 25 | export default MicrophoneDevices; 26 | -------------------------------------------------------------------------------- /apps/chat/src/components/DeviceSelection/SpeakerDevices/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React, { useState } from 'react'; 5 | import { 6 | SpeakerSelection, 7 | SecondaryButton, 8 | useAudioOutputs 9 | } from 'amazon-chime-sdk-component-library-react'; 10 | 11 | import TestSound from '../../../utilities/TestSound'; 12 | 13 | const SpeakerDevices = () => { 14 | const { selectedDevice } = useAudioOutputs(); 15 | const [selectedOutput, setSelectedOutput] = useState(selectedDevice); 16 | 17 | const handleChange = (deviceId: string): void => { 18 | setSelectedOutput(deviceId); 19 | }; 20 | 21 | const handleTestSpeaker = () => { 22 | new TestSound(selectedOutput); 23 | }; 24 | 25 | return ( 26 |
27 | 28 | 29 |
30 | ); 31 | }; 32 | 33 | export default SpeakerDevices; 34 | -------------------------------------------------------------------------------- /apps/chat/src/components/DeviceSelection/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | 6 | import { StyledWrapper, StyledAudioGroup, StyledVideoGroup } from './Styled'; 7 | import MicrophoneDevices from './MicrophoneDevices'; 8 | import SpeakerDevices from './SpeakerDevices'; 9 | import CameraDevices from './CameraDevices'; 10 | 11 | const DeviceSelection = () => ( 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | ); 22 | 23 | export default DeviceSelection; 24 | -------------------------------------------------------------------------------- /apps/chat/src/constants/routes.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | const awsPath = '/Prod'; 5 | export const rootPath = window.location.href.includes(awsPath) 6 | ? `${awsPath}/` 7 | : '/'; 8 | 9 | const routes = { 10 | SIGNIN: `${rootPath}`, 11 | CHAT: `${rootPath}rooms`, 12 | DEVICE: `${rootPath}devices`, 13 | MEETING: `${rootPath}meeting`, 14 | }; 15 | 16 | export default routes; 17 | -------------------------------------------------------------------------------- /apps/chat/src/containers/EndMeetingControl/Styled.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import styled from 'styled-components'; 5 | 6 | export const StyledP = styled.p` 7 | padding: 1rem 1rem 1rem 0; 8 | `; 9 | -------------------------------------------------------------------------------- /apps/chat/src/containers/MeetingControls/Styled.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import styled from 'styled-components'; 5 | 6 | interface StyledProps { 7 | active: boolean; 8 | } 9 | 10 | export const StyledControls = styled.div` 11 | opacity: ${props => (props.active ? '1' : '0')}; 12 | transition: opacity 250ms ease; 13 | 14 | @media screen and (max-width: 768px) { 15 | opacity: 1; 16 | } 17 | 18 | .controls-menu { 19 | width: 100%; 20 | position: static; 21 | } 22 | `; 23 | -------------------------------------------------------------------------------- /apps/chat/src/containers/MeetingDetails/Styled.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import styled from 'styled-components'; 5 | 6 | export const StyledList = styled.dl` 7 | font-size: 1rem; 8 | 9 | dt { 10 | display: inline-block; 11 | margin-bottom: 0.75rem; 12 | margin-right: 0.5rem; 13 | 14 | &::after { 15 | content: ':'; 16 | } 17 | } 18 | 19 | dd { 20 | display: inline-block; 21 | font-weight: 600; 22 | } 23 | `; 24 | -------------------------------------------------------------------------------- /apps/chat/src/containers/MeetingMetrics/Styled.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import styled from 'styled-components'; 5 | 6 | export const StyledMetrics = styled.div` 7 | position: absolute; 8 | top: 0.5rem; 9 | right: 0.5rem; 10 | min-width: 7.5rem; 11 | z-index: 5; 12 | 13 | .metric { 14 | white-space: nowrap; 15 | font-size: 0.75rem; 16 | margin-bottom: 0.375rem; 17 | 18 | &.title { 19 | font-weight: bold; 20 | } 21 | } 22 | `; 23 | -------------------------------------------------------------------------------- /apps/chat/src/containers/Navigation/NavigationControl.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | 6 | import MeetingRoster from '../MeetingRoster'; 7 | import MeetingChat from '../MeetingChat'; 8 | import Navigation from '.'; 9 | import { useNavigation } from '../../providers/NavigationProvider'; 10 | 11 | const NavigationControl = () => { 12 | const { showNavbar, showRoster, showChat } = useNavigation(); 13 | 14 | return ( 15 | <> 16 | {showNavbar ? : null} 17 | {showChat ? : null} 18 | {showRoster ? : null} 19 | 20 | ); 21 | }; 22 | 23 | export default NavigationControl; 24 | -------------------------------------------------------------------------------- /apps/chat/src/containers/Notifications/index.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | import { 6 | useNotificationState, 7 | NotificationGroup, 8 | } from 'amazon-chime-sdk-component-library-react'; 9 | 10 | const Notifications = () => { 11 | const { notifications } = useNotificationState(); 12 | 13 | return notifications.length ? : null; 14 | }; 15 | 16 | export default Notifications; 17 | -------------------------------------------------------------------------------- /apps/chat/src/containers/Presence/ChannelPresence.css: -------------------------------------------------------------------------------- 1 | .channel-members-list-header { 2 | background-color: inherit; 3 | text-align: center; 4 | padding: 0.75rem; 5 | margin-bottom: 0.5rem; 6 | border-bottom: 0.5px solid #d4d5d8; 7 | position: sticky; 8 | z-index: 2; 9 | top: 0; 10 | right: 0; 11 | left: 0; 12 | } 13 | 14 | .channel-members-list-header-title { 15 | padding-left: 1rem; 16 | } 17 | 18 | .channel-members-list-item { 19 | padding: 0 8px 8px; 20 | } 21 | 22 | .channel-members-container { 23 | background-color: #f0f1f2; 24 | border-left: 1px solid #d4d5d8; 25 | height: 100%; 26 | overflow-y: scroll; 27 | min-width: 12rem; 28 | } 29 | -------------------------------------------------------------------------------- /apps/chat/src/containers/TypingIndicator/index.css: -------------------------------------------------------------------------------- 1 | .typing-indicator { 2 | display: block; 3 | width: 100%; 4 | height: 100%; 5 | padding-bottom: 0.5rem; 6 | } 7 | 8 | .typing-indicator span { 9 | background-color: gray; 10 | border-radius: 50%; 11 | display: block; 12 | float: left; 13 | height: 5px; 14 | width: 5px; 15 | margin: 0 1px; 16 | opacity: 0.4; 17 | } 18 | 19 | .typing-indicator span:nth-child(1) { 20 | animation: 1s blink infinite 334ms; 21 | } 22 | 23 | .typing-indicator span:nth-child(2) { 24 | animation: 1s blink infinite 667ms; 25 | } 26 | 27 | .typing-indicator span:nth-child(3) { 28 | animation: 1s blink infinite 1s; 29 | } 30 | 31 | @keyframes blink { 32 | 50% { 33 | opacity: 1; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /apps/chat/src/containers/channels/ChannelsWrapper.css: -------------------------------------------------------------------------------- 1 | .channel-list-header { 2 | display: flex; 3 | justify-content: space-between; 4 | padding: 0.25rem 0.5rem; 5 | border-bottom: 0.5px solid #d4d5d8; 6 | } 7 | 8 | button.create-channel-button { 9 | height: 2rem; 10 | width: 2rem; 11 | } 12 | 13 | .channel-list-header-title { 14 | padding-left: 1rem; 15 | } 16 | .channel-list-header, 17 | .channel-list-header-title { 18 | display: flex; 19 | align-items: center; 20 | cursor: unset; 21 | } 22 | 23 | ul.ch-popover-menu { 24 | backdrop-filter: none; 25 | } 26 | 27 | button.ch-sts-popover-toggle.ch-popover-toggle { 28 | right: auto; 29 | border-radius: inherit; 30 | margin: inherit; 31 | width: 100%; 32 | height: 100%; 33 | } 34 | 35 | button.ch-sts-popover-toggle.ch-popover-toggle:hover { 36 | background-color: #004ddb; 37 | } 38 | 39 | li.separator { 40 | margin: 0.5rem 0; 41 | } 42 | -------------------------------------------------------------------------------- /apps/chat/src/containers/input/Input.css: -------------------------------------------------------------------------------- 1 | .message-input-form { 2 | flex: auto; 3 | padding: 1rem 0 1rem 1rem; 4 | } 5 | 6 | span.text-input { 7 | display: flex; 8 | flex-grow: 1; 9 | } 10 | 11 | .text-input input { 12 | width: 100%; 13 | } 14 | 15 | .message-input-container { 16 | border-top: 1px solid #e4e9f2; 17 | display: flex; 18 | flex-flow: row; 19 | margin-top: auto; 20 | margin-bottom: 0; 21 | min-height: 4rem; 22 | } 23 | 24 | .message-input-container .write-link.attach { 25 | margin: 1rem 1rem auto 0.5rem; 26 | } 27 | 28 | .message-input-container .attachment-preview { 29 | display: flex; 30 | } 31 | 32 | .message-input-container .attachment-preview span { 33 | margin: auto 0; 34 | } 35 | 36 | .message-input-container.join-channel-message { 37 | display: flex; 38 | justify-content: center; 39 | align-items: center; 40 | } 41 | -------------------------------------------------------------------------------- /apps/chat/src/containers/loginWithCognito/LoginWithCognito.css: -------------------------------------------------------------------------------- 1 | form.signin-form { 2 | display: flex; 3 | flex-direction: column; 4 | margin-top: 1rem; 5 | } 6 | 7 | div.input.username-input, div.input.password-input { 8 | margin-left: -5rem; 9 | width: 100%; 10 | grid-template-columns: 18% 1fr; 11 | } 12 | 13 | div.input { 14 | margin-bottom: 2rem; 15 | text-align: left; 16 | } 17 | 18 | div.input span { 19 | width: 25rem; 20 | } 21 | 22 | .input input { 23 | width: 100%; 24 | } 25 | 26 | div.input span { 27 | width: 25rem; 28 | } 29 | 30 | .signin-buttons { 31 | display: flex; 32 | justify-content: space-between; 33 | align-items: center; 34 | } 35 | 36 | .or-span { 37 | font-size: .875rem; 38 | } 39 | -------------------------------------------------------------------------------- /apps/chat/src/containers/loginWithCredentialExchangeService/LoginWithCredentialExchangeService.css: -------------------------------------------------------------------------------- 1 | form.signin-form { 2 | display: flex; 3 | flex-direction: column; 4 | margin-top: 1rem; 5 | } 6 | 7 | div.input.access-token-input{ 8 | margin-left: -5rem; 9 | width: 100%; 10 | grid-template-columns: 18% 1fr; 11 | } 12 | 13 | div.input { 14 | margin-bottom: 2rem; 15 | text-align: left; 16 | } 17 | 18 | div.input span { 19 | width: 25rem; 20 | } 21 | 22 | .input input { 23 | width: 100%; 24 | } 25 | 26 | div.input span { 27 | width: 25rem; 28 | } 29 | 30 | .access-token-submit-button { 31 | display: flex; 32 | justify-content: space-between; 33 | align-items: center; 34 | } 35 | 36 | .or-span { 37 | font-size: .875rem; 38 | } 39 | -------------------------------------------------------------------------------- /apps/chat/src/containers/messages/Messages.css: -------------------------------------------------------------------------------- 1 | .message { 2 | margin: 0 1.5rem 0.5rem 0.5rem; 3 | white-space: pre-wrap; 4 | } 5 | 6 | .message-list-container { 7 | background-color: #f0f1f2; 8 | overflow-y: scroll; 9 | position: relative; 10 | } 11 | 12 | .message-list-header { 13 | background-color: inherit; 14 | text-align: center; 15 | padding: 0.76rem; 16 | margin-bottom: 1rem; 17 | border-bottom: 0.5px solid #d4d5d8; 18 | position: sticky; 19 | z-index: 2; 20 | top: 0; 21 | right: 0; 22 | left: 0; 23 | } 24 | -------------------------------------------------------------------------------- /apps/chat/src/index.js: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | import ReactDOM from 'react-dom'; 6 | import Chat from './Chat'; 7 | import configureAmplify from './services/servicesConfig'; 8 | 9 | // Call services configuration 10 | configureAmplify(); 11 | 12 | document.addEventListener('DOMContentLoaded', _event => { 13 | ReactDOM.render(, document.getElementById('root')); 14 | }); 15 | -------------------------------------------------------------------------------- /apps/chat/src/providers/UserPermissionProvider.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React, { useContext, useState } from 'react'; 5 | const UserPermissionContext = React.createContext(); 6 | 7 | const UserPermissionProvider = ({ children }) => { 8 | const [role, setRole] = useState('user'); 9 | const providerValue = { 10 | role, 11 | setRole, 12 | }; 13 | 14 | return ( 15 | 16 | {children} 17 | 18 | ); 19 | }; 20 | 21 | const useUserPermission = () => { 22 | const context = useContext(UserPermissionContext); 23 | 24 | if (!context) { 25 | throw new Error( 26 | 'useUserPermission must be used within UserPermissionProvider' 27 | ); 28 | } 29 | 30 | return context; 31 | }; 32 | 33 | export { UserPermissionProvider, useUserPermission }; 34 | -------------------------------------------------------------------------------- /apps/chat/src/utilities/arnParser.js: -------------------------------------------------------------------------------- 1 | const arnParser = (arn) => { 2 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | // SPDX-License-Identifier: MIT-0 4 | 5 | const arnMap = [ 6 | 'arn', 7 | 'aws', 8 | 'service', 9 | 'region', 10 | 'namespace', 11 | 'relativeId', 12 | 'relativeValue', 13 | ]; 14 | return arn.split(':').reduce(function (aggregator, piece, index) { 15 | aggregator[arnMap[index]] = piece; 16 | return aggregator; 17 | }, {}); 18 | }; 19 | 20 | export default arnParser; 21 | -------------------------------------------------------------------------------- /apps/chat/src/utilities/formatBytes.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-restricted-properties */ 2 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | // SPDX-License-Identifier: MIT-0 4 | 5 | const formatBytes = (bytes, decimals = 2) => { 6 | if (bytes === 0) return '0 Bytes'; 7 | 8 | const k = 1024; 9 | const dm = decimals < 0 ? 0 : decimals; 10 | const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; 11 | 12 | const i = Math.floor(Math.log(bytes) / Math.log(k)); 13 | 14 | return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`; 15 | }; 16 | 17 | export default formatBytes; 18 | -------------------------------------------------------------------------------- /apps/chat/src/utilities/styles.css: -------------------------------------------------------------------------------- 1 | li span.date-header { 2 | width: fit-content; 3 | width: -moz-fit-content; 4 | margin: 0 auto; 5 | display: flex; 6 | } 7 | -------------------------------------------------------------------------------- /apps/chat/src/views/DeviceSetup/Styled.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import styled from 'styled-components'; 5 | 6 | export const StyledLayout = styled.main` 7 | display: flex; 8 | flex-direction: column; 9 | align-items: center; 10 | justify-content: center; 11 | min-height: 100%; 12 | max-width: 85rem; 13 | padding: 2rem; 14 | margin: auto; 15 | 16 | @media (max-width: 760px) { 17 | border-right: unset; 18 | align-items: unset; 19 | justify-content: unset; 20 | } 21 | `; 22 | -------------------------------------------------------------------------------- /apps/chat/src/views/DeviceSetup/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | import { Heading } from 'amazon-chime-sdk-component-library-react'; 6 | 7 | import JoinMeetingDetails from '../../containers/MeetingJoinDetails'; 8 | import { StyledLayout } from './Styled'; 9 | import DeviceSelection from '../../components/DeviceSelection'; 10 | 11 | const DeviceSetup: React.FC = () => ( 12 | 13 | 14 | Device settings 15 | 16 | 17 | 18 | 19 | ); 20 | 21 | export default DeviceSetup; 22 | -------------------------------------------------------------------------------- /apps/chat/src/views/Signin/style.css: -------------------------------------------------------------------------------- 1 | .signin-container { 2 | text-align: center; 3 | width: 25rem; 4 | margin: 0 auto; 5 | margin-top: 6.5rem; 6 | } 7 | -------------------------------------------------------------------------------- /apps/chat/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "esnext", 4 | "outDir": "build", 5 | "noImplicitAny": true, 6 | "noUnusedLocals": true, 7 | "removeComments": true, 8 | "preserveConstEnums": true, 9 | "sourceMap": true, 10 | "target": "es2018", 11 | "rootDirs": ["src"], 12 | "allowJs": true, 13 | "checkJs": false, 14 | "jsx": "react", 15 | "types": ["react"], 16 | "pretty": true, 17 | "skipLibCheck": true, 18 | "strict": true, 19 | "moduleResolution": "node", 20 | "esModuleInterop": true, 21 | "lib": ["es5", "es6", "es7", "es2017", "dom"], 22 | "allowSyntheticDefaultImports": true, 23 | "forceConsistentCasingInFileNames": true, 24 | "resolveJsonModule": true, 25 | "suppressImplicitAnyIndexErrors": true, 26 | }, 27 | "include": ["src/**/*"], 28 | "exclude": [ 29 | "node_modules", 30 | "build" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /apps/iOS-WKWebView-sample/.gitignore: -------------------------------------------------------------------------------- 1 | ## User settings 2 | xcuserdata/ 3 | .build/ 4 | playground.xcworkspace 5 | -------------------------------------------------------------------------------- /apps/iOS-WKWebView-sample/WkWebView Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/iOS-WKWebView-sample/WkWebView Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /apps/iOS-WKWebView-sample/WkWebView Demo/AppConfiguration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppConfiguration.swift 3 | // WkWebView Demo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | import Foundation 10 | 11 | struct AppConfiguration { 12 | static let url = "YOUR_SERVER_URL" 13 | } 14 | -------------------------------------------------------------------------------- /apps/iOS-WKWebView-sample/WkWebView Demo/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/iOS-WKWebView-sample/WkWebView Demo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /apps/iOS-WKWebView-sample/WkWebView Demo/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // WkWebView Demo 4 | // 5 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 6 | // SPDX-License-Identifier: MIT-0 7 | // 8 | 9 | import UIKit 10 | 11 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 12 | var window: UIWindow? 13 | 14 | func scene(_ scene: UIScene, 15 | willConnectTo _: UISceneSession, 16 | options _: UIScene.ConnectionOptions) 17 | { 18 | guard let _ = (scene as? UIWindowScene) else { return } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/iOS-WKWebView-sample/WkWebView DemoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /apps/meeting/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | -------------------------------------------------------------------------------- /apps/meeting/app/meeting.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Chime SDK Meeting Demo 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /apps/meeting/serverless/.gitignore: -------------------------------------------------------------------------------- 1 | src/index.html 2 | build -------------------------------------------------------------------------------- /apps/meeting/serverless/src/index.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | 3 | exports.handler = async (event, context, callback) => { 4 | var response = { 5 | "statusCode": 200, 6 | "headers": { 7 | 'Content-Type': 'text/html' 8 | }, 9 | "body": '', 10 | "isBase64Encoded": false 11 | }; 12 | response.body = fs.readFileSync('./index.html', {encoding: 'utf8'}); 13 | callback(null, response); 14 | }; 15 | -------------------------------------------------------------------------------- /apps/meeting/serverless/src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chime-sdk-meeting-serverless-demos", 3 | "version": "0.1.0", 4 | "description": "Amazon Chime SDK Serverless Demos", 5 | "license": "Apache-2.0", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/aws-samples/amazon-chime-sdk" 9 | }, 10 | "dependencies": { 11 | "@aws-sdk/client-chime-sdk-meetings": "^3.490.0", 12 | "@aws-sdk/client-cloudwatch-logs": "^3.490.0", 13 | "@aws-sdk/client-dynamodb": "^3.494.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /apps/meeting/src/components/ActivityBar/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | import styled from 'styled-components'; 6 | 7 | const Track = styled.div` 8 | width: 100%; 9 | height: 0.625rem; 10 | background-color: #ecf0f1; 11 | border-radius: 0.25rem; 12 | `; 13 | 14 | const Progress = styled.div` 15 | height: 0.625rem; 16 | background-color: #18bc9c; 17 | border-radius: 0.25rem; 18 | transform: scaleX(0); 19 | transform-origin: left; 20 | transition: transform 33ms ease-in-out; 21 | will-change: transform; 22 | `; 23 | 24 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 25 | const ActivityBar = React.forwardRef((props, ref: any) => ( 26 | 27 | 28 | 29 | )); 30 | 31 | ActivityBar.displayName = 'ActivityBar'; 32 | 33 | export default ActivityBar; 34 | -------------------------------------------------------------------------------- /apps/meeting/src/components/Card/Styled.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import styled from 'styled-components'; 5 | 6 | export const SmallText = styled.small` 7 | color: rgba(0, 0, 0, 0.5); 8 | `; 9 | 10 | export const StyledCard = styled.div` 11 | .ch-body { 12 | margin-bottom: 1rem; 13 | } 14 | 15 | .ch-header { 16 | font-size: 1.5rem; 17 | } 18 | 19 | .ch-title { 20 | font-size: 1.25rem; 21 | margin-top: 1rem; 22 | } 23 | 24 | .ch-description { 25 | margin: 1rem 0 1rem 0; 26 | } 27 | `; 28 | -------------------------------------------------------------------------------- /apps/meeting/src/components/Card/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | 6 | import { SmallText, StyledCard } from './Styled'; 7 | 8 | interface CardProps extends React.HTMLAttributes { 9 | header?: string; 10 | title: string; 11 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 12 | description: any; 13 | smallText?: string; 14 | } 15 | 16 | const Card: React.FC = ({ 17 | header, 18 | title, 19 | description, 20 | smallText, 21 | }: CardProps) => ( 22 | 23 | {header &&
{header}
} 24 |
25 |
{title}
26 |
{description}
27 | {smallText && {smallText}} 28 |
29 |
30 | ); 31 | 32 | export default Card; 33 | -------------------------------------------------------------------------------- /apps/meeting/src/components/DeviceSelection/MicrophoneDevices/MicrophoneActivityPreview.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | import { Label } from 'amazon-chime-sdk-component-library-react'; 6 | 7 | import { StyledPreviewGroup } from '../Styled'; 8 | import MicrophoneActivityPreviewBar from './MicrophoneActivityPreviewBar'; 9 | 10 | const MicrophoneActivityPreview = () => { 11 | return ( 12 | 13 | 16 | 17 | 18 | ); 19 | }; 20 | 21 | export default MicrophoneActivityPreview; 22 | -------------------------------------------------------------------------------- /apps/meeting/src/components/DeviceSelection/MicrophoneDevices/MicrophoneActivityPreviewBar.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React, { useRef } from 'react'; 5 | import { useLocalAudioInputActivityPreview } from 'amazon-chime-sdk-component-library-react'; 6 | 7 | import ActivityBar from '../../ActivityBar'; 8 | 9 | const MicrophoneActivityPreviewBar = () => { 10 | const activityBarRef = useRef(); 11 | useLocalAudioInputActivityPreview(activityBarRef); 12 | 13 | return ; 14 | }; 15 | 16 | export default MicrophoneActivityPreviewBar; 17 | -------------------------------------------------------------------------------- /apps/meeting/src/components/DeviceSelection/MicrophoneDevices/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | import { 6 | Heading, 7 | MicSelection, 8 | } from 'amazon-chime-sdk-component-library-react'; 9 | 10 | import { title } from '../Styled'; 11 | import MicrophoneActivityPreview from './MicrophoneActivityPreview'; 12 | 13 | const MicrophoneDevices = () => { 14 | return ( 15 |
16 | 17 | Audio 18 | 19 | 20 | 21 |
22 | ); 23 | }; 24 | 25 | export default MicrophoneDevices; 26 | -------------------------------------------------------------------------------- /apps/meeting/src/components/DeviceSelection/SpeakerDevices/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React, { useState } from 'react'; 5 | import { 6 | SpeakerSelection, 7 | SecondaryButton, 8 | useAudioOutputs, 9 | } from 'amazon-chime-sdk-component-library-react'; 10 | 11 | import TestSound from '../../../utils/TestSound'; 12 | 13 | const SpeakerDevices = () => { 14 | const { selectedDevice } = useAudioOutputs(); 15 | const [selectedOutput, setSelectedOutput] = useState(selectedDevice); 16 | 17 | const handleChange = (deviceId: string): void => { 18 | setSelectedOutput(deviceId); 19 | }; 20 | 21 | const handleTestSpeaker = () => { 22 | new TestSound(selectedOutput); 23 | }; 24 | 25 | return ( 26 |
27 | 28 | 29 |
30 | ); 31 | }; 32 | 33 | export default SpeakerDevices; 34 | -------------------------------------------------------------------------------- /apps/meeting/src/components/DeviceSelection/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | 6 | import { StyledWrapper, StyledAudioGroup, StyledVideoGroup } from './Styled'; 7 | import MicrophoneDevices from './MicrophoneDevices'; 8 | import SpeakerDevices from './SpeakerDevices'; 9 | import CameraDevices from './CameraDevices'; 10 | 11 | const DeviceSelection = () => ( 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | ); 22 | 23 | export default DeviceSelection; 24 | -------------------------------------------------------------------------------- /apps/meeting/src/components/MediaStatsList/MetricItem.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | import { StyledItemMetricName, StyledItemMetricValue } from './Styled'; 6 | 7 | export interface MetricItemProps { 8 | metricName: string; 9 | metricValues: string[]; 10 | } 11 | 12 | export const MetricItem: React.FC = ({ 13 | metricName, 14 | metricValues, 15 | }) => { 16 | const showMetricItem = metricValues[0] && metricValues[0] !== ''; 17 | return ( 18 | <> 19 | {showMetricItem && ( 20 | <> 21 | {metricName} 22 | {metricValues.map(metricValue => { 23 | return {metricValue}; 24 | })} 25 | 26 | )} 27 | 28 | ); 29 | }; 30 | 31 | export default MetricItem; 32 | -------------------------------------------------------------------------------- /apps/meeting/src/components/MediaStatsList/Styled.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import styled from 'styled-components'; 5 | 6 | export const StyledList = styled.dl` 7 | font-size: 0.75rem; 8 | display: flex; 9 | flex-wrap: wrap; 10 | width: 28.125rem; 11 | `; 12 | 13 | export const StyledItemMetricName = styled.dt` 14 | line-height: 1.5rem; 15 | margin-left: 1.5rem; 16 | width: 30%; 17 | `; 18 | 19 | export const StyledItemMetricValue = styled.dd` 20 | line-height: 1.5rem; 21 | width: 30%; 22 | margin-left: 0; 23 | `; 24 | 25 | export const StyledMediaMetricsWrapper = styled.div` 26 | header { 27 | border-bottom: none; 28 | } 29 | 30 | .ch-title { 31 | font-weight: bold; 32 | font-size: 0.75rem; 33 | padding: 0 1.5rem; 34 | } 35 | 36 | .ch-popover-menu { 37 | max-width: 30rem; 38 | } 39 | `; -------------------------------------------------------------------------------- /apps/meeting/src/components/MediaStatsList/index.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | 6 | import { MetricItemProps } from './MetricItem'; 7 | import { StyledList } from './Styled'; 8 | 9 | export interface MediaStatsListProps { 10 | children?: React.ReactElement | React.ReactElement[]; 11 | } 12 | 13 | export const MediaStatsList: React.FC = ({ children }) => ( 14 | {children} 15 | ); 16 | 17 | export default MediaStatsList; -------------------------------------------------------------------------------- /apps/meeting/src/components/RemoteVideo.tsx: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from 'react'; 5 | 6 | type Props = { 7 | enabled: boolean; 8 | attendeeName?: string; 9 | videoEleRef: (instance: HTMLVideoElement | null) => void; 10 | }; 11 | 12 | const RemoteVideo: React.FC = ({ videoEleRef, enabled }) => ( 13 |