react-native-video
Advanced tools
Comparing version 0.4.12 to 0.5.0
{ | ||
"name": "react-native-video", | ||
"version": "0.4.12", | ||
"version": "0.5.0", | ||
"description": "A <Video /> element for react-native", | ||
@@ -31,3 +31,7 @@ "main": "Video.ios.js", | ||
"jest-cli": "0.2.1" | ||
}, | ||
"dependencies": { | ||
"keymirror": "^0.1.1", | ||
"merge": "^1.2.0" | ||
} | ||
} |
'use strict'; | ||
var warning = require('warning'); | ||
var Video = { | ||
test: function() { | ||
warning("Not yet implemented for Android."); | ||
console.warn("Not yet implemented for Android."); | ||
} | ||
@@ -9,0 +7,0 @@ }; |
var React = require('react-native'); | ||
var { requireNativeComponent, } = React; | ||
var ReactNativeViewAttributes = require('ReactNativeViewAttributes'); | ||
var NativeModules = require('NativeModules'); | ||
var StyleSheet = require('StyleSheet'); | ||
var PropTypes = require('ReactPropTypes'); | ||
var StyleSheetPropType = require('StyleSheetPropType'); | ||
var { StyleSheet, requireNativeComponent, PropTypes, NativeModules, } = React; | ||
var VideoResizeMode = require('./VideoResizeMode'); | ||
var VideoStylePropTypes = require('./VideoStylePropTypes'); | ||
var NativeMethodsMixin = require('NativeMethodsMixin'); | ||
var flattenStyle = require('flattenStyle'); | ||
var merge = require('merge'); | ||
var deepDiffer = require('deepDiffer'); | ||
var VIDEO_REF = 'video'; | ||
var Video = React.createClass({ | ||
@@ -22,3 +16,2 @@ propTypes: { | ||
/* Wrapper component */ | ||
style: StyleSheetPropType(VideoStylePropTypes), | ||
source: PropTypes.object, | ||
@@ -38,7 +31,4 @@ resizeMode: PropTypes.string, | ||
mixins: [NativeMethodsMixin], | ||
viewConfig: { | ||
uiViewClassName: 'UIView', | ||
validAttributes: ReactNativeViewAttributes.UIView | ||
setNativeProps(props) { | ||
this.refs[VIDEO_REF].setNativeProps(props); | ||
}, | ||
@@ -75,3 +65,3 @@ | ||
render() { | ||
var style = flattenStyle([styles.base, this.props.style]); | ||
var style = [styles.base, this.props.style]; | ||
var source = this.props.source; | ||
@@ -110,3 +100,3 @@ var uri = source.uri; | ||
return <RCTVideo {... nativeProps} />; | ||
return <RCTVideo ref={VIDEO_REF} {... nativeProps} />; | ||
}, | ||
@@ -113,0 +103,0 @@ }); |
'use strict'; | ||
var keyMirror = require('keyMirror'); | ||
var keyMirror = require('keymirror'); | ||
@@ -5,0 +5,0 @@ var VideoResizeMode = keyMirror({ |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
46814
2
15
105
+ Addedkeymirror@^0.1.1
+ Addedmerge@^1.2.0
+ Addedkeymirror@0.1.1(transitive)
+ Addedmerge@1.2.1(transitive)