react-native-video
Advanced tools
Comparing version 0.4.5 to 0.4.7
{ | ||
"name": "react-native-video", | ||
"version": "0.4.5", | ||
"version": "0.4.7", | ||
"description": "A <Video /> element for react-native", | ||
@@ -5,0 +5,0 @@ "main": "Video.ios.js", |
## react-native-video | ||
A <Video> component for react-native, as seen in | ||
[react-native-login](https://github.com/brentvatne/react-native-login). | ||
[react-native-login](https://github.com/brentvatne/react-native-login)! | ||
@@ -14,3 +14,3 @@ Requires react-native >= 0.4.4 | ||
3. Add `libRTCVideo.a` to `Build Phases -> Link Binary With Libraries` | ||
[(Screenshot)](http://url.brentvatne.ca/g9Wp). | ||
![(Screenshot)](http://url.brentvatne.ca/g9Wp.png). | ||
4. Add `.mp4` video file to project and to `Build Phases -> Copy Bundle Resources` | ||
@@ -17,0 +17,0 @@ 5. Whenever you want to use it within React code now you can: `var Video = |
var React = require('react-native'); | ||
var { requireNativeComponent, } = React; | ||
var ReactNativeViewAttributes = require('ReactNativeViewAttributes'); | ||
var NativeModules = require('NativeModules'); | ||
var ReactNativeViewAttributes = require('ReactNativeViewAttributes'); | ||
var StyleSheet = require('StyleSheet'); | ||
var createReactIOSNativeComponentClass = require('createReactNativeComponentClass'); | ||
var PropTypes = require('ReactPropTypes'); | ||
@@ -17,2 +17,7 @@ var StyleSheetPropType = require('StyleSheetPropType'); | ||
propTypes: { | ||
/* Native only */ | ||
src: PropTypes.object, | ||
seek: PropTypes.number, | ||
/* Wrapper component */ | ||
style: StyleSheetPropType(VideoStylePropTypes), | ||
@@ -107,8 +112,3 @@ source: PropTypes.object, | ||
var RCTVideo = createReactIOSNativeComponentClass({ | ||
validAttributes: merge(ReactNativeViewAttributes.UIView, | ||
{src: {diff: deepDiffer}, resizeMode: true, repeat: true, | ||
seek: true, paused: true, muted: true, volume: true, rate: true}), | ||
uiViewClassName: 'RCTVideo', | ||
}); | ||
var RCTVideo = requireNativeComponent('RCTVideo', Video); | ||
@@ -115,0 +115,0 @@ var styles = StyleSheet.create({ |
Sorry, the diff of this file is not supported yet
46116
125