Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chriselly/react-native-mediaplayer

Fullscreen media player for React Native
https://github.com/chriselly/react-native-mediaplayer

Last synced: 5 days ago
JSON representation

Fullscreen media player for React Native

Awesome Lists containing this project

README

        

# react-native-mediaplayer
Simple full screen media player for React Native.

## Installation
Install using npm with `npm install --save react-native-mediaplayer`. React Native >=0.4.0 is needed.

1. Using Xcode open the project navigator, right click and choose `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-native-mediaplayer` and add `RNMediaPlayer.h` and `RNMediaPlayer.m`

## Usage
```javascript
var React = require('react-native');
var MediaPlayer = require('react-native-mediaplayer');

MediaPlayer.open({uri: 'filename.ext'});
```

The best use case is to add it with onPress to load a video when the user taps on an item.

## Other notes

Only supports iOS 8.0 and later due to AVPlayerViewController usage.
File extensions must be specified due to media types at the moment.