├── app.json ├── .bundle └── config ├── babel.config.js ├── NOTICE.txt ├── src ├── assets │ ├── video.png │ ├── hang-off.png │ ├── microphone.png │ ├── video-disabled.png │ └── microphone-muted.png ├── utils │ ├── Api.js │ └── Bridge.js ├── components │ ├── HangOffButton.js │ ├── AttendeeItem.js │ ├── MuteButton.js │ ├── CameraButton.js │ └── RNVideoRenderView.js ├── containers │ ├── Login.js │ └── Meeting.js ├── Style.js └── App.js ├── ios ├── RNDemo │ ├── Images.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── AppDelegate.h │ ├── RNVideoViewManager.h │ ├── main.m │ ├── RNVideoViewManager.m │ ├── NativeMobileSDKBridge.h │ ├── Info.plist │ ├── MeetingObservers.h │ ├── AppDelegate.m │ ├── MeetingObservers.m │ └── NativeMobileSDKBridge.m ├── RNDemo.xcworkspace │ └── contents.xcworkspacedata ├── .xcode.env ├── RNDemoTests │ ├── Info.plist │ └── RNDemoTests.m ├── Podfile ├── RNDemo.xcodeproj │ └── xcshareddata │ │ └── xcschemes │ │ └── RNDemo.xcscheme ├── LaunchScreen.storyboard └── Podfile.lock ├── android ├── app │ ├── debug.keystore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── amazonaws │ │ │ │ │ └── services │ │ │ │ │ └── chime │ │ │ │ │ └── rndemo │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ ├── NativeMobileSDKBridgePackage.kt │ │ │ │ │ ├── RNVideoViewManager.kt │ │ │ │ │ ├── MainApplication.java │ │ │ │ │ ├── RNEventEmitter.kt │ │ │ │ │ ├── MeetingObservers.kt │ │ │ │ │ └── NativeMobileSDKBridge.kt │ │ │ └── AndroidManifest.xml │ │ └── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ └── com │ │ │ └── amazonaws │ │ │ └── services │ │ │ └── chime │ │ │ └── rndemo │ │ │ └── ReactNativeFlipper.java │ ├── proguard-rules.pro │ ├── build_defs.bzl │ ├── _BUCK │ └── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle ├── gradle.properties ├── build.gradle ├── gradlew.bat └── gradlew ├── index.js ├── CODE_OF_CONDUCT.md ├── metro.config.js ├── __tests__ ├── App-test.js └── __snapshots__ │ └── App-test.js.snap ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md └── stale.yml ├── package.json ├── .gitignore ├── LICENSE.txt ├── CONTRIBUTING.md ├── README.md └── THIRD-PARTY.txt /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RNDemo", 3 | "displayName": "RNDemo" 4 | } -------------------------------------------------------------------------------- /.bundle/config: -------------------------------------------------------------------------------- 1 | 2 | BUNDLE_PATH: "vendor/bundle" 3 | BUNDLE_FORCE_RUBY_PLATFORM: 1 -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | amazon-chime-react-native-demo 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -------------------------------------------------------------------------------- /src/assets/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/src/assets/video.png -------------------------------------------------------------------------------- /ios/RNDemo/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/assets/hang-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/src/assets/hang-off.png -------------------------------------------------------------------------------- /src/assets/microphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/src/assets/microphone.png -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/android/app/debug.keystore -------------------------------------------------------------------------------- /src/assets/video-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/src/assets/video-disabled.png -------------------------------------------------------------------------------- /src/assets/microphone-muted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/src/assets/microphone-muted.png -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-chime-react-native-demo/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | RNDemo 8 | 9 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /ios/RNDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | import {AppRegistry} from 'react-native'; 7 | import App from './src/App'; 8 | import {name as appName} from './app.json'; 9 | 10 | AppRegistry.registerComponent(appName, () => App); 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/RNDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | // SPDX-License-Identifier: MIT-0 4 | // 5 | 6 | #import 7 | #import 8 | 9 | @interface AppDelegate : UIResponder 10 | 11 | @property (nonatomic, strong) UIWindow *window; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/RNDemo/RNVideoViewManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | // SPDX-License-Identifier: MIT-0 4 | // 5 | 6 | #import 7 | #import 8 | #import 9 | #import 10 | 11 | @interface RNVideoViewManager : RCTViewManager 12 | @end 13 | -------------------------------------------------------------------------------- /ios/RNDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | // SPDX-License-Identifier: MIT-0 4 | // 5 | 6 | #import 7 | 8 | #import "AppDelegate.h" 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: true, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import { Login } from '../src/containers/Login'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | test('renders correctly', () => { 13 | const tree = renderer.create().toJSON(); 14 | // jest snapshot testing: https://jestjs.io/docs/en/snapshot-testing 15 | expect(tree).toMatchSnapshot() 16 | }); 17 | -------------------------------------------------------------------------------- /src/utils/Api.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | const SERVER_URL = 'YOUR_SERVER_URL'; 7 | const SERVER_REGION = 'YOUR_SERVER_REGION' 8 | 9 | export function createMeetingRequest(meetingName, attendeeName) { 10 | 11 | let url = encodeURI(SERVER_URL + "/join?" + `title=${meetingName}&name=${attendeeName}®ion=${SERVER_REGION}`); 12 | 13 | return fetch(url, { method: 'POST' }).then(j => j.json()); 14 | } 15 | -------------------------------------------------------------------------------- /ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | # NODE_BINARY variable contains the PATH to the node executable. 6 | # 7 | # Customize the NODE_BINARY variable here. 8 | # For example, to use nvm with brew, add the following line 9 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 10 | export NODE_BINARY=$(command -v node) -------------------------------------------------------------------------------- /ios/RNDemo/RNVideoViewManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | // SPDX-License-Identifier: MIT-0 4 | // 5 | 6 | #import "RNVideoViewManager.h" 7 | 8 | @implementation RNVideoViewManager 9 | static NSMutableDictionary *videoMap; 10 | 11 | RCT_EXPORT_MODULE(RNVideoView); 12 | 13 | - (UIView *)view 14 | { 15 | DefaultVideoRenderView *innerView = [[DefaultVideoRenderView alloc] init]; 16 | innerView.contentMode = UIViewContentModeScaleAspectFit; 17 | return innerView; 18 | } 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -keep class com.facebook.hermes.unicode.** { *; } 12 | -keep class com.facebook.jni.** { *; } -------------------------------------------------------------------------------- /src/components/HangOffButton.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | import React from 'react' 7 | import {TouchableOpacity, Image} from 'react-native' 8 | import styles from '../Style'; 9 | 10 | export const HangOffButton = ({onPress}) => { 11 | return ( 12 | { 14 | onPress(); 15 | }}> 16 | 20 | 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/amazonaws/services/chime/rndemo/MainActivity.java: -------------------------------------------------------------------------------- 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.rndemo; 7 | 8 | import com.facebook.react.ReactActivity; 9 | 10 | public class MainActivity extends ReactActivity { 11 | 12 | /** 13 | * Returns the name of the main component registered from JavaScript. This is used to schedule 14 | * rendering of the component. 15 | */ 16 | @Override 17 | protected String getMainComponentName() { 18 | return "RNDemo"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/components/AttendeeItem.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | import React from 'react'; 7 | import { View, Text, Image } from 'react-native'; 8 | import styles from '../Style'; 9 | 10 | let mutedImg = require('../assets/microphone-muted.png'); 11 | 12 | export const AttendeeItem = ({ attendeeName, muted }) => { 13 | return ( 14 | 15 | {attendeeName} 16 | { 17 | muted && 18 | } 19 | 20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. -------------------------------------------------------------------------------- /src/components/MuteButton.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | import React from 'react' 7 | import {TouchableOpacity, Image} from 'react-native' 8 | import styles from '../Style'; 9 | 10 | let mutedImg = require('../assets/microphone-muted.png'); 11 | let normalImg = require('../assets/microphone.png'); 12 | 13 | export const MuteButton = ({muted, onPress}) => { 14 | return ( 15 | { 17 | onPress(); 18 | }}> 19 | 23 | 24 | ) 25 | } 26 | -------------------------------------------------------------------------------- /src/components/CameraButton.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | import React from 'react' 7 | import {TouchableOpacity, Image} from 'react-native' 8 | import styles from '../Style'; 9 | 10 | let videoDisabledImg = require('../assets/video-disabled.png'); 11 | let videoImg = require('../assets/video.png'); 12 | 13 | export const CameraButton = ({disabled, onPress}) => { 14 | return ( 15 | { 17 | onPress(); 18 | }}> 19 | 23 | 24 | ) 25 | } 26 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | rootProject.name = 'RNDemo' 7 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 8 | include ':app' 9 | 10 | includeBuild('../node_modules/react-native-gradle-plugin') 11 | if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") { 12 | include(":ReactAndroid") 13 | project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid') 14 | include(":ReactAndroid:hermes-engine") 15 | project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine') 16 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RNDemo", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "start": "react-native start", 9 | "test": "jest", 10 | "lint": "eslint ." 11 | }, 12 | "dependencies": { 13 | "react": "18.0.0", 14 | "react-native": "^0.69.10" 15 | }, 16 | "devDependencies": { 17 | "@babel/core": "^7.12.9", 18 | "@babel/runtime": "^7.12.5", 19 | "@react-native-community/eslint-config": "^2.0.0", 20 | "babel-jest": "^29.5.0", 21 | "eslint": "^7.32.0", 22 | "jest": "^29.5.0", 23 | "metro-react-native-babel-preset": "^0.70.3", 24 | "react-test-renderer": "18.0.0" 25 | }, 26 | "jest": { 27 | "preset": "react-native" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 9 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 14 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - enhancement 8 | - crash 9 | - bug 10 | - documentation 11 | - feature-request 12 | # Label to use when marking an issue as stale 13 | staleLabel: inactive 14 | # Comment to post when marking an issue as stale. Set to `false` to disable 15 | markComment: > 16 | This issue has been automatically marked as stale because it has not had 17 | recent activity. It will be closed if no further activity occurs. Thank you 18 | for your contributions. 19 | # Comment to post when closing a stale issue. Set to `false` to disable 20 | closeComment: false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | *.framework 25 | Pods/ 26 | 27 | # Android/IntelliJ 28 | # 29 | build/ 30 | .idea 31 | .gradle 32 | local.properties 33 | *.iml 34 | *.apk 35 | *.aar 36 | 37 | # node.js 38 | # 39 | node_modules/ 40 | npm-debug.log 41 | yarn-error.log 42 | 43 | # BUCK 44 | buck-out/ 45 | \.buckd/ 46 | *.keystore 47 | 48 | # Bundle artifact 49 | *.jsbundle 50 | /vendor/bundle/ 51 | 52 | **/fastlane/report.xml 53 | **/fastlane/Preview.html 54 | **/fastlane/screenshots 55 | **/fastlane/test_output -------------------------------------------------------------------------------- /ios/RNDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/RNDemo/NativeMobileSDKBridge.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | // SPDX-License-Identifier: MIT-0 4 | // 5 | 6 | #import 7 | #import 8 | #import 9 | #import 10 | 11 | #define kMeetingId @"MeetingId" 12 | #define kExternalMeetingId @"ExternalMeetingId" 13 | #define kMediaRegion @"MediaRegion" 14 | 15 | #define kAttendeeId @"AttendeeId" 16 | #define kExternalUserId @"ExternalUserId" 17 | #define kJoinToken @"JoinToken" 18 | 19 | #define kMediaPlacement @"MediaPlacement" 20 | #define kAudioFallbackUrl @"AudioFallbackUrl" 21 | #define kAudioHostUrl @"AudioHostUrl" 22 | #define kTurnControlUrl @"TurnControlUrl" 23 | #define kSignalingUrl @"SignalingUrl" 24 | 25 | @interface NativeMobileSDKBridge : RCTEventEmitter 26 | @end 27 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 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 this 4 | software and associated documentation files (the "Software"), to deal in the Software 5 | without restriction, including without limitation the rights to use, copy, modify, 6 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 7 | 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 IMPLIED, 10 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 11 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 12 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 13 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 14 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Logs** 24 | If applicable, add logs from logcat to help explain your problem. 25 | 26 | **Screenshots** 27 | If applicable, add screenshots to help explain your problem. 28 | 29 | **Test environment Info (please complete the following information):** 30 | - Device: [e.g. Pixel3] 31 | - OS: [e.g. Android 10] 32 | - Version amazon-chime-sdk: [e.g. 0.4.0] 33 | - Version amazon-chime-sdk-media: [e.g. 0.4.0] 34 | - Can you reproduce this in the demo app? 35 | If you are reporting a crash: 36 | - Please provide full crash logs. 37 | 38 | **Additional context** 39 | Add any other context about the problem here. -------------------------------------------------------------------------------- /ios/RNDemo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/amazonaws/services/chime/rndemo/NativeMobileSDKBridgePackage.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.rndemo 7 | 8 | import com.facebook.react.ReactPackage 9 | import com.facebook.react.bridge.NativeModule 10 | import com.facebook.react.bridge.ReactApplicationContext 11 | import com.facebook.react.uimanager.ViewManager 12 | import java.util.Collections.singletonList 13 | 14 | import kotlin.collections.ArrayList 15 | 16 | class NativeMobileSDKBridgePackage : ReactPackage { 17 | override fun createNativeModules(reactContext: ReactApplicationContext): List { 18 | val eventEmitter = RNEventEmitter(reactContext) 19 | val meetingObservers = MeetingObservers(eventEmitter) 20 | 21 | val modules = ArrayList() 22 | modules.add(NativeMobileSDKBridge(reactContext, eventEmitter, meetingObservers)) 23 | return modules 24 | } 25 | 26 | override fun createViewManagers(reactContext: ReactApplicationContext): List> { 27 | return singletonList(RNVideoViewManager()) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/containers/Login.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | import React from 'react'; 7 | import { View, Text, TextInput, Button, Alert } from 'react-native'; 8 | import styles from '../Style'; 9 | 10 | export class Login extends React.Component { 11 | constructor() { 12 | super(); 13 | this.meetingName = ""; 14 | this.userName = ""; 15 | } 16 | 17 | startMeeting = () => { 18 | if (!this.meetingName || !this.userName) { 19 | Alert.alert("Meeting name and user name can not be empty"); 20 | } else { 21 | this.props.onSubmit(this.meetingName, this.userName); 22 | } 23 | } 24 | 25 | renderForm() { 26 | return ( 27 | 28 | this.meetingName = val.trim()} /> 29 | this.userName = val.trim()} /> 30 |