Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/chriselly/react-native-mediaplayer
- Owner: chriselly
- Created: 2015-07-12T23:59:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-06T15:19:40.000Z (over 9 years ago)
- Last Synced: 2024-11-19T09:40:11.913Z (23 days ago)
- Language: Objective-C
- Size: 152 KB
- Stars: 13
- Watchers: 2
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-react-native - react-native-mediaplayer ★12 - Simple full screen media player for React Native. (Components / Media)
- awesome-react-native - react-native-mediaplayer ★12 - Simple full screen media player for React Native. (Components / Media)
- awesome-react-native - react-native-mediaplayer ★12 - Simple full screen media player for React Native. (Components / Media)
- awesome-react-native-ui - react-native-mediaplayer ★8 - Simple full screen media player for React Native. (Components / Media)
- awesome-react-native - react-native-mediaplayer ★12 - Simple full screen media player for React Native. (Components / Media)
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.