Add a reference to `ReactNativeVideo` to your main application project. From Visual Studio 2015:
1. Right-click main application project > Add > Reference...
2.
UWP: Check `ReactNativeVideo` from Solution Projects.
2a. UWP: Check `ReactNativeVideo` from Solution Projects.
WPF: Check `ReactNativeVideo.Net46` from Solution Projects.
**MainPage.cs**
@@ -143,6 +159,7 @@ using System.Collections.Generic;
...
```
</details>
## Usage
@@ -181,6 +198,7 @@ using System.Collections.Generic;
// Later to trigger fullscreen
this.player.presentFullscreenPlayer()
// Disable fullscreen
this.player.dismissFullscreenPlayer()
@@ -202,47 +220,16 @@ To see the full list of available props, you can check the [propTypes](https://g
- By default, iOS 9+ will only load encrypted HTTPS urls. If you need to load content from a webserver that only supports HTTP, you will need to modify your Info.plist file and add the following entry:
This will look for an .mp4 file (background.mp4) in the given expansion version.
### Load files with the RN Asset System
@@ -261,20 +248,6 @@ The asset system [introduced in RN `0.14`](http://www.reactnative.com/react-nati
To enable audio to play in background on iOS the audio session needs to be set to `AVAudioSessionCategoryPlayback`. See [Apple documentation][3] for additional details. (NOTE: there is now a ticket to [expose this as a prop](https://github.com/react-native-community/react-native-video/issues/310) )
## Static Methods
`seek(seconds)`
Seeks the video to the specified time (in seconds). Access using a ref to the component
`presentFullscreenPlayer()`
Enable the fullscreen player. Access using a ref to the component.
`dimissFullscreenPlayer()`
Disable the fullscreen player. Access using a ref to the component.
## Examples
- See an [Example integration][1] in `react-native-login`*note that this example uses an older version of this library, before we used `export default` -- if you use `require` you will need to do `require('react-native-video').default` as per instructions above.*