React Native Windows updates (#2206)
Various updates for React Native Windows **Docs** * Fixed windows installation in readme * Added local dev setup instructions **Build** * Added VS solutions for RNW 0.61, 0.62, and 0.63+ * Added clang-formatting definition **Features** * Fixed autolinking for RNW 0.63+ * Added support for `rate` property **Examples** * Upgraded examples/basic to RN 0.61 and replaced broken windows app
This commit is contained in:
38
README.md
38
README.md
@@ -187,32 +187,46 @@ protected List<ReactPackage> getPackages() {
|
||||
<details>
|
||||
<summary>Windows RNW C++/WinRT details</summary>
|
||||
|
||||
#### Autolinking
|
||||
|
||||
**React Native Windows 0.63 and above**
|
||||
|
||||
Autolinking should automatically add react-native-video to your app.
|
||||
|
||||
#### Manual Linking
|
||||
|
||||
**React Native Windows 0.62**
|
||||
|
||||
Make the following additions to the given files manually:
|
||||
|
||||
#### **windows/myapp.sln**
|
||||
##### **windows\myapp.sln**
|
||||
|
||||
Add the `ReactNativeVideoCPP` project to your solution.
|
||||
Add the _ReactNativeVideoCPP_ project to your solution (eg. `windows\myapp.sln`):
|
||||
|
||||
1. Open the solution in Visual Studio 2019
|
||||
2. Right-click Solution icon in Solution Explorer > Add > Existing Project
|
||||
Select `node_modules\react-native-video\windows\ReactNativeVideoCPP\ReactNativeVideoCPP.vcxproj`
|
||||
1. Open your solution in Visual Studio 2019
|
||||
2. Right-click Solution icon in Solution Explorer > Add > Existing Project...
|
||||
3. Select `node_modules\react-native-video\windows\ReactNativeVideoCPP\ReactNativeVideoCPP.vcxproj`
|
||||
|
||||
#### **windows/myapp/myapp.vcxproj**
|
||||
##### **windows\myapp\myapp.vcxproj**
|
||||
|
||||
Add a reference to `ReactNativeVideoCPP` to your main application project. From Visual Studio 2019:
|
||||
Add a reference to _ReactNativeVideoCPP_ to your main application project (eg. `windows\myapp\myapp.vcxproj`):
|
||||
|
||||
1. Right-click main application project > Add > Reference...
|
||||
Check `ReactNativeVideoCPP` from Solution Projects.
|
||||
1. Open your solution in Visual Studio 2019
|
||||
2. Right-click main application project > Add > Reference...
|
||||
3. Check _ReactNativeVideoCPP_ from Solution Projects
|
||||
|
||||
2. Modify files below to add the video package providers to your main application project
|
||||
#### **pch.h**
|
||||
##### **pch.h**
|
||||
|
||||
Add `#include "winrt/ReactNativeVideoCPP.h"`.
|
||||
|
||||
#### **app.cpp**
|
||||
##### **app.cpp**
|
||||
|
||||
Add `PackageProviders().Append(winrt::ReactNativeVideoCPP::ReactPackageProvider());` before `InitializeComponent();`.
|
||||
|
||||
**React Native Windows 0.61 and below**
|
||||
|
||||
Follow the manual linking instuctions for React Native Windows 0.62 above, but substitute _ReactNativeVideoCPP61_ for _ReactNativeVideoCPP_.
|
||||
|
||||
</details>
|
||||
|
||||
### react-native-dom installation
|
||||
|
Reference in New Issue
Block a user