Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New project for supporting Video for React Native Windows Cpp/WinRT #1893

Merged
merged 7 commits into from
Feb 25, 2020
Merged
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
48 changes: 15 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,52 +184,34 @@ protected List<ReactPackage> getPackages() {

### Windows installation
<details>
<summary>Windows details</summary>
<summary>Windows RNW C++/WinRT details</summary>

Make the following additions to the given files manually:

#### **windows/myapp.sln**

Add the `ReactNativeVideo` project to your solution.
Add the `ReactNativeVideoCPP` project to your solution.

1. Open the solution in Visual Studio 2015
1. Open the solution in Visual Studio 2019
2. Right-click Solution icon in Solution Explorer > Add > Existing Project
* UWP: Select `node_modules\react-native-video\windows\ReactNativeVideo\ReactNativeVideo.csproj`
* WPF: Select `node_modules\react-native-video\windows\ReactNativeVideo.Net46\ReactNativeVideo.Net46.csproj`
Select `node_modules\react-native-video\windows\ReactNativeVideoCPP\ReactNativeVideoCPP.vcxproj`

#### **windows/myapp/myapp.csproj**
#### **windows/myapp/myapp.vcxproj**

Add a reference to `ReactNativeVideo` to your main application project. From Visual Studio 2015:
Add a reference to `ReactNativeVideoCPP` to your main application project. From Visual Studio 2019:

1. Right-click main application project > Add > Reference...
* UWP: Check `ReactNativeVideo` from Solution Projects.
* WPF: Check `ReactNativeVideo.Net46` from Solution Projects.
Check `ReactNativeVideoCPP` from Solution Projects.

#### **MainPage.cs**
2. Modify files below to add the video package providers to your main application project
#### **pch.h**

Add `#include "winrt/ReactNativeVideoCPP.h"`.

#### **app.cpp**

Add `PackageProviders().Append(winrt::ReactNativeVideoCPP::ReactPackageProvider());` before `InitializeComponent();`.

Add the `ReactVideoPackage` class to your list of exported packages.
```cs
using ReactNative;
using ReactNative.Modules.Core;
using ReactNative.Shell;
using ReactNativeVideo; // <-- Add this
using System.Collections.Generic;
...

public override List<IReactPackage> Packages
{
get
{
return new List<IReactPackage>
{
new MainReactPackage(),
new ReactVideoPackage(), // <-- Add this
};
}
}

...
```
</details>

### react-native-dom installation
Expand Down
36 changes: 0 additions & 36 deletions windows/ReactNativeVideo.Net46/Properties/AssemblyInfo.cs

This file was deleted.

74 changes: 0 additions & 74 deletions windows/ReactNativeVideo.Net46/ReactNativeVideo.Net46.csproj

This file was deleted.

15 changes: 0 additions & 15 deletions windows/ReactNativeVideo.Net46/ReactVideoEventType.cs

This file was deleted.

36 changes: 0 additions & 36 deletions windows/ReactNativeVideo.Net46/ReactVideoEventTypeExtensions.cs

This file was deleted.

30 changes: 0 additions & 30 deletions windows/ReactNativeVideo.Net46/ReactVideoPackage.cs

This file was deleted.

Loading