From 8a8f21547e9d26a3e5b4d84a866093f48fab33cf Mon Sep 17 00:00:00 2001 From: vok Date: Sat, 6 Jul 2019 07:37:38 +0700 Subject: [PATCH 1/7] chang maven to google --- examples/basic/android/app/build.gradle | 11 ++++------- examples/basic/android/build.gradle | 4 +--- examples/basic/android/settings.gradle | 6 ------ 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/examples/basic/android/app/build.gradle b/examples/basic/android/app/build.gradle index 9813192114..77cc9f7a26 100644 --- a/examples/basic/android/app/build.gradle +++ b/examples/basic/android/app/build.gradle @@ -83,16 +83,16 @@ def enableSeparateBuildPerCPUArchitecture = false def enableProguardInReleaseBuilds = false android { - compileSdkVersion 28 - buildToolsVersion '28.0.3' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } defaultConfig { applicationId "com.videoplayer" - minSdkVersion 16 - targetSdkVersion 28 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" ndk { @@ -132,11 +132,8 @@ android { dependencies { implementation project(':react-native-video') - // compile "com.android.support:appcompat-v7:25.2.0" implementation "androidx.appcompat:appcompat:1.0.0" implementation "com.facebook.react:react-native:+" // From node_modules - // implementation project(':react-native-video') -// compile project(':react-native-video-exoplayer') // uncomment to use exoplayer } // Run this once to be able to run the application with BUCK diff --git a/examples/basic/android/build.gradle b/examples/basic/android/build.gradle index 3161c39de4..5e5d6decd1 100644 --- a/examples/basic/android/build.gradle +++ b/examples/basic/android/build.gradle @@ -24,9 +24,7 @@ buildscript { allprojects { repositories { mavenLocal() - maven { - url 'https://maven.google.com' - } + google() maven { url "https://jitpack.io" } diff --git a/examples/basic/android/settings.gradle b/examples/basic/android/settings.gradle index 4de2c7838f..5fc7fca440 100644 --- a/examples/basic/android/settings.gradle +++ b/examples/basic/android/settings.gradle @@ -3,10 +3,4 @@ rootProject.name = 'VideoPlayer' include ':react-native-video' project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer') -// Quick Local Development -//project(':react-native-video').projectDir = new File(rootProject.projectDir, '../../android') -//project(':react-native-video-exoplayer').projectDir = new File(rootProject.projectDir, '../../android-exoplayer') - -// project(':react-native-video').projectDir = new File(rootProject.projectDir, '../../android') -// project(':react-native-video-exoplayer').projectDir = new File(rootProject.projectDir, '../../android-exoplayer') include ':app' From 47e1630679b1e48421337c32b00c787c3aa63b22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marin=CC=83o?= Date: Wed, 10 Jul 2019 08:06:28 +0200 Subject: [PATCH 2/7] remove rnpm --- package.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/package.json b/package.json index 08b0dafcfd..7b33428ac1 100644 --- a/package.json +++ b/package.json @@ -45,11 +45,6 @@ "scripts": { "test": "node_modules/.bin/eslint *.js" }, - "rnpm": { - "android": { - "sourceDir": "./android-exoplayer" - } - }, "files": [ "android-exoplayer", "android", From 95060d7bbf8a3cae838e90bd2ff3a3a7123ebec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mari=C3=B1o=20Ruiz?= <1237997+CHaNGeTe@users.noreply.github.com> Date: Tue, 23 Jul 2019 11:29:50 +0200 Subject: [PATCH 3/7] Update README.md Make installation parts easier to link --- README.md | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 87b7914ab3..b9b08015ee 100644 --- a/README.md +++ b/README.md @@ -42,14 +42,15 @@ yarn add react-native-video Then follow the instructions for your platform to link react-native-video into your project: +### iOS
- iOS + iOS details -### Standard Method +#### Standard Method Run `react-native link react-native-video` to link the react-native-video library. -### Using CocoaPods (required to enable caching) +#### Using CocoaPods (required to enable caching) Setup your Podfile like it is described in the [react-native documentation](https://facebook.github.io/react-native/docs/integration-with-existing-apps#configuring-cocoapods-dependencies). @@ -73,8 +74,9 @@ end
-
- tvOS +### tvOS +
+ tvOS Detiails `react-native link react-native-video` doesn’t work properly with the tvOS target so we need to add the library manually. @@ -95,14 +97,15 @@ Select RCTVideo-tvOS
+### Android
- Android + Android details Run `react-native link react-native-video` to link the react-native-video library. Or if you have trouble, make the following additions to the given files manually: -**android/settings.gradle** +#### **android/settings.gradle** The newer ExoPlayer library will work for most people. @@ -119,7 +122,7 @@ project(':react-native-video').projectDir = new File(rootProject.projectDir, '.. ``` -**android/app/build.gradle** +#### **android/app/build.gradle** ```gradle dependencies { @@ -130,7 +133,7 @@ dependencies { } ``` -**android/gradle.properties** +#### **android/gradle.properties** Migrating to AndroidX: @@ -139,7 +142,7 @@ android.useAndroidX=true android.enableJetifier=true ``` -**MainApplication.java** +#### **MainApplication.java** On top, where imports are: @@ -160,12 +163,13 @@ protected List getPackages() { ```
+### Windows
- Windows + Windows details Make the following additions to the given files manually: -**windows/myapp.sln** +#### **windows/myapp.sln** Add the `ReactNativeVideo` project to your solution. @@ -174,7 +178,7 @@ Add the `ReactNativeVideo` project to your solution. * UWP: Select `node_modules\react-native-video\windows\ReactNativeVideo\ReactNativeVideo.csproj` * WPF: Select `node_modules\react-native-video\windows\ReactNativeVideo.Net46\ReactNativeVideo.Net46.csproj` -**windows/myapp/myapp.csproj** +#### **windows/myapp/myapp.csproj** Add a reference to `ReactNativeVideo` to your main application project. From Visual Studio 2015: @@ -182,7 +186,7 @@ Add a reference to `ReactNativeVideo` to your main application project. From Vis * UWP: Check `ReactNativeVideo` from Solution Projects. * WPF: Check `ReactNativeVideo.Net46` from Solution Projects. -**MainPage.cs** +#### **MainPage.cs** Add the `ReactVideoPackage` class to your list of exported packages. ```cs @@ -209,12 +213,13 @@ using System.Collections.Generic; ```
+### react-native-dom
- react-native-dom + react-native-dom details Make the following additions to the given files manually: -**dom/bootstrap.js** +#### **dom/bootstrap.js** Import RCTVideoManager and add it to the list of nativeModules: From 66a85ae9c66048eb9cac612295b499c96518c766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mari=C3=B1o=20Ruiz?= <1237997+CHaNGeTe@users.noreply.github.com> Date: Tue, 23 Jul 2019 11:31:41 +0200 Subject: [PATCH 4/7] Update README.md fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b9b08015ee..5e28b18d0d 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ end ### tvOS
- tvOS Detiails + tvOS details `react-native link react-native-video` doesn’t work properly with the tvOS target so we need to add the library manually. From 62ff44ab3558617c8b871239961b7758467ddb50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mari=C3=B1o=20Ruiz?= <1237997+CHaNGeTe@users.noreply.github.com> Date: Tue, 23 Jul 2019 11:38:08 +0200 Subject: [PATCH 5/7] Update README.md Make more obvious the changes needed via using diff --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e28b18d0d..20c4f9e78b 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,9 @@ project(':react-native-video').projectDir = new File(rootProject.projectDir, '.. #### **android/app/build.gradle** -```gradle +From version >= 5.0.0, you have to apply this changes: + +```diff dependencies { ... compile project(':react-native-video') @@ -135,7 +137,7 @@ dependencies { ``` #### **android/gradle.properties** -Migrating to AndroidX: +Migrating to AndroidX (needs version >= 5.0.0): ```gradle.properties android.useAndroidX=true From d748d17aeac8e1faa3479cd0ef4c2f81df7f4b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mari=C3=B1o=20Ruiz?= <1237997+CHaNGeTe@users.noreply.github.com> Date: Tue, 23 Jul 2019 12:02:31 +0200 Subject: [PATCH 6/7] Update MainApplication.java fix indent --- .../app/src/main/java/com/videoplayer/MainApplication.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/basic/android/app/src/main/java/com/videoplayer/MainApplication.java b/examples/basic/android/app/src/main/java/com/videoplayer/MainApplication.java index e9f6432264..a269841570 100644 --- a/examples/basic/android/app/src/main/java/com/videoplayer/MainApplication.java +++ b/examples/basic/android/app/src/main/java/com/videoplayer/MainApplication.java @@ -24,8 +24,8 @@ public boolean getUseDeveloperSupport() { protected List getPackages() { return Arrays.asList( new MainReactPackage(), - new ReactVideoPackage() - ); + new ReactVideoPackage() + ); } }; From 222adf5f7bf31d8ae004bba79387d2524cf834bd Mon Sep 17 00:00:00 2001 From: vok Date: Wed, 24 Jul 2019 09:02:50 +0700 Subject: [PATCH 7/7] remove matchingfallbacks in example --- android-exoplayer/build.gradle | 3 --- examples/basic/android/app/build.gradle | 1 - 2 files changed, 4 deletions(-) diff --git a/android-exoplayer/build.gradle b/android-exoplayer/build.gradle index 9f4b7f1092..5290c88c2b 100644 --- a/android-exoplayer/build.gradle +++ b/android-exoplayer/build.gradle @@ -28,11 +28,8 @@ dependencies { } // All support libs must use the same version - // implementation "com.android.support:support-annotations:${safeExtGet('supportLibVersion', '+')}" implementation "androidx.annotation:annotation:1.0.0" - // implementation "com.android.support:support-compat:${safeExtGet('supportLibVersion', '+')}" implementation "androidx.core:core:1.0.0" - // implementation "com.android.support:support-media-compat:${safeExtGet('supportLibVersion', '+')}" implementation "androidx.media:media:1.0.0" implementation('com.google.android.exoplayer:extension-okhttp:2.9.3') { diff --git a/examples/basic/android/app/build.gradle b/examples/basic/android/app/build.gradle index 77cc9f7a26..915e4eca61 100644 --- a/examples/basic/android/app/build.gradle +++ b/examples/basic/android/app/build.gradle @@ -111,7 +111,6 @@ android { release { signingConfig signingConfigs.debug minifyEnabled enableProguardInReleaseBuilds - matchingFallbacks = ['release', 'debug'] proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } }