feat(Windows): Adds Windows support to react-native-video
This PR adds react-native-windows support to react-native-video. The Video component is implemented with a XAML MediaPlayerElement. Most of the features implemented by Android (and some additional ones) are implemented by Windows.
Known issues and missing features include:
* onReadyForDisplay event
* local URI convention (e.g., "broadchurch" in examples changed to require("./broadchurch.mp4")
* `playableDuration` in `onVideoProgress` event is always 0.0
* `playInBackground` is not yet supported
* Volume settings are applied, but the UWP control does not handle it properly
This commit is contained in:
30
windows/ReactNativeVideo/ReactVideoPackage.cs
Normal file
30
windows/ReactNativeVideo/ReactVideoPackage.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using ReactNative.Bridge;
|
||||
using ReactNative.Modules.Core;
|
||||
using ReactNative.UIManager;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ReactNativeVideo
|
||||
{
|
||||
public class ReactVideoPackage : IReactPackage
|
||||
{
|
||||
public IReadOnlyList<Type> CreateJavaScriptModulesConfig()
|
||||
{
|
||||
return Array.Empty<Type>();
|
||||
}
|
||||
|
||||
public IReadOnlyList<INativeModule> CreateNativeModules(ReactContext reactContext)
|
||||
{
|
||||
return Array.Empty<INativeModule>();
|
||||
|
||||
}
|
||||
|
||||
public IReadOnlyList<IViewManager> CreateViewManagers(ReactContext reactContext)
|
||||
{
|
||||
return new List<IViewManager>
|
||||
{
|
||||
new ReactVideoViewManager(),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user