Update README.md
Make installation parts easier to link
This commit is contained in:
parent
47e1630679
commit
95060d7bbf
37
README.md
37
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:
|
Then follow the instructions for your platform to link react-native-video into your project:
|
||||||
|
|
||||||
|
### iOS
|
||||||
<details>
|
<details>
|
||||||
<summary>iOS</summary>
|
<summary>iOS details</summary>
|
||||||
|
|
||||||
### Standard Method
|
#### Standard Method
|
||||||
|
|
||||||
Run `react-native link react-native-video` to link the react-native-video library.
|
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).
|
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
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
### tvOS
|
||||||
<summary>tvOS</summary>
|
<details>
|
||||||
|
<summary>tvOS Detiails</summary>
|
||||||
|
|
||||||
`react-native link react-native-video` doesn’t work properly with the tvOS target so we need to add the library manually.
|
`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
|
|||||||
<img src="./docs/tvOS-step-4.jpg" width="40%">
|
<img src="./docs/tvOS-step-4.jpg" width="40%">
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
### Android
|
||||||
<details>
|
<details>
|
||||||
<summary>Android</summary>
|
<summary>Android details</summary>
|
||||||
|
|
||||||
Run `react-native link react-native-video` to link the react-native-video library.
|
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:
|
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.
|
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
|
```gradle
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -130,7 +133,7 @@ dependencies {
|
|||||||
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
**android/gradle.properties**
|
#### **android/gradle.properties**
|
||||||
|
|
||||||
Migrating to AndroidX:
|
Migrating to AndroidX:
|
||||||
|
|
||||||
@ -139,7 +142,7 @@ android.useAndroidX=true
|
|||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
```
|
```
|
||||||
|
|
||||||
**MainApplication.java**
|
#### **MainApplication.java**
|
||||||
|
|
||||||
On top, where imports are:
|
On top, where imports are:
|
||||||
|
|
||||||
@ -160,12 +163,13 @@ protected List<ReactPackage> getPackages() {
|
|||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
### Windows
|
||||||
<details>
|
<details>
|
||||||
<summary>Windows</summary>
|
<summary>Windows details</summary>
|
||||||
|
|
||||||
Make the following additions to the given files manually:
|
Make the following additions to the given files manually:
|
||||||
|
|
||||||
**windows/myapp.sln**
|
#### **windows/myapp.sln**
|
||||||
|
|
||||||
Add the `ReactNativeVideo` project to your solution.
|
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`
|
* UWP: Select `node_modules\react-native-video\windows\ReactNativeVideo\ReactNativeVideo.csproj`
|
||||||
* WPF: Select `node_modules\react-native-video\windows\ReactNativeVideo.Net46\ReactNativeVideo.Net46.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:
|
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.
|
* UWP: Check `ReactNativeVideo` from Solution Projects.
|
||||||
* WPF: Check `ReactNativeVideo.Net46` from Solution Projects.
|
* WPF: Check `ReactNativeVideo.Net46` from Solution Projects.
|
||||||
|
|
||||||
**MainPage.cs**
|
#### **MainPage.cs**
|
||||||
|
|
||||||
Add the `ReactVideoPackage` class to your list of exported packages.
|
Add the `ReactVideoPackage` class to your list of exported packages.
|
||||||
```cs
|
```cs
|
||||||
@ -209,12 +213,13 @@ using System.Collections.Generic;
|
|||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
### react-native-dom
|
||||||
<details>
|
<details>
|
||||||
<summary>react-native-dom</summary>
|
<summary>react-native-dom details</summary>
|
||||||
|
|
||||||
Make the following additions to the given files manually:
|
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:
|
Import RCTVideoManager and add it to the list of nativeModules:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user