Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ android.iml
#
example/ios/Pods
/vendor/bundle/

.cxx/
*.keystore
!debug.keystore
# node.js
#
node_modules/
Expand Down Expand Up @@ -70,3 +72,8 @@ example/ios/.xcode.env.local

# env var
example/.env

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*
# testing
/coverage
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '2.7.5'
gem 'cocoapods', '~> 1.11', '>= 1.11.2'
ruby '>= 2.6.10'

gem 'cocoapods', '~> 1.13'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,36 @@ npm install amazon-ivs-react-native-player
pod install
```

## Setup

Add the following attrs in `/android/app/src/main/AndroidManifest.xml` file

```xml
<activity
...
android:supportsPictureInPicture="true"
...
```

If you don't have to receive updates when the pip mode is entered or exited, you are good to go. In order to subscribe to the changes in the pip mode, add the following code to `MainActivity.java`.

Add this import to the activity

```java
import com.amazonaws.ivs.reactnative.player.AmazonIvsView;


public class MainActivity extends ReactActivity {

...

@Override
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, Configuration newConfig) {
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig);
AmazonIvsView.Companion.emitPipModeChangedEvent(isInPictureInPictureMode);
}
```

## Usage

```tsx
Expand Down
2 changes: 1 addition & 1 deletion THIRD-PARTY-LICENSES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ definition file.
https://github.com/DefinitelyTyped/DefinitelyTyped
Copyrights are respective of each contributor listed at the beginning of each
definition file.
** @types/react-native; version 0.62.13 --
** @types/react-native; version 0.72.7 --
https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native
Copyrights are respective of each contributor listed at the beginning of each
definition file.
Expand Down
11 changes: 11 additions & 0 deletions android/.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
<filteredResources>
<filter>
<id>1703791770297</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
6 changes: 3 additions & 3 deletions android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
arguments=
arguments=--init-script /var/folders/zv/q5dzwvz93m96n03pbc2sm5s80000gn/T/d146c9752a26f79b52047fb6dc6ed385d064e120494f96f08ca63a317c41f94c.gradle --init-script /var/folders/zv/q5dzwvz93m96n03pbc2sm5s80000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.0))
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
java.home=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
jvm.arguments=
offline.mode=false
override.workspace.settings=true
Expand Down
7 changes: 7 additions & 0 deletions android/app/src/main/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.13)

# Define the library name here.
project(rndiffapp_appmodules)

# This file includes all the necessary to let you build your application with the New Architecture.
include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake)
6 changes: 2 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ buildscript {
repositories {
google()
mavenCentral()
google()
}

dependencies {
classpath("com.android.tools.build:gradle:7.0.4")
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("de.undercouch:gradle-download-task:4.1.2")
// noinspection DifferentKotlinGradleVersion
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
Expand Down Expand Up @@ -124,8 +122,8 @@ repositories {
}
}

def kotlin_version = getExtOrDefault('kotlinVersion')
def ivs_version = getExtOrDefault('ivsVersion')
def kotlin_version = getExtOrDefault('kotlinVersion')

dependencies {
// noinspection GradleDynamicVersion
Expand Down
7 changes: 4 additions & 3 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
AmazonIvs_kotlinVersion=1.6.10
AmazonIvs_compileSdkVersion=31
AmazonIvs_buildToolsVersion=31.0.0
AmazonIvs_targetSdkVersion=31
AmazonIvs_compileSdkVersion=33
AmazonIvs_buildToolsVersion=33.0.0
AmazonIvs_targetSdkVersion=33
AmazonIvs_ivsVersion=1.18.0

3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
19 changes: 13 additions & 6 deletions android/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion android/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading