Skip to content

Commit

Permalink
React Native Windows updates
Browse files Browse the repository at this point in the history
Various updates for React Native Windows

* Fixed windows installation in readme
* Added local dev setup instructions

* Added VS solutions for RNW 0.61, 0.62, and 0.63+
* Added clang-formatting definition

* Fixed autolinking for RNW 0.63+
* Added support for `rate` property

* Removed broken windows app for examples/basic
  • Loading branch information
jonthysell committed Nov 10, 2020
1 parent faf8aed commit df953a5
Show file tree
Hide file tree
Showing 39 changed files with 1,404 additions and 1,095 deletions.
38 changes: 26 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
89 changes: 0 additions & 89 deletions examples/basic/windows/.gitignore

This file was deleted.

141 changes: 0 additions & 141 deletions examples/basic/windows/VideoPlayer.sln

This file was deleted.

8 changes: 0 additions & 8 deletions examples/basic/windows/VideoPlayer/App.xaml

This file was deleted.

Loading

0 comments on commit df953a5

Please sign in to comment.