[Android] repeat, muted, volume properties fully working

This commit is contained in:
Baris Sencan
2015-11-05 17:13:35 -08:00
parent 4362e596a8
commit c03c45a362
4 changed files with 116 additions and 105 deletions

View File

@@ -4,6 +4,7 @@ const {
StyleSheet,
requireNativeComponent,
PropTypes,
NativeModules,
} = React;
const VideoResizeMode = require('./VideoResizeMode');
@@ -49,13 +50,13 @@ class Video extends Component {
let nativeResizeMode;
if (resizeMode === VideoResizeMode.stretch) {
nativeResizeMode = RCTVideo.ScaleToFill;
nativeResizeMode = NativeModules.UIManager.RCTVideo.Constants.ScaleToFill;
} else if (resizeMode === VideoResizeMode.contain) {
nativeResizeMode = RCTVideo.ScaleAspectFit;
nativeResizeMode = NativeModules.UIManager.RCTVideo.Constants.ScaleAspectFit;
} else if (resizeMode === VideoResizeMode.cover) {
nativeResizeMode = RCTVideo.ScaleAspectFill;
nativeResizeMode = NativeModules.UIManager.RCTVideo.Constants.ScaleAspectFill;
} else {
nativeResizeMode = RCTVideo.ScaleNone;
nativeResizeMode = NativeModules.UIManager.RCTVideo.Constants.ScaleNone;
}
const nativeProps = Object.assign({}, this.props);