From c03c45a3627613a39c754883708b2866792eb3a2 Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Thu, 5 Nov 2015 17:13:35 -0800 Subject: [PATCH] [Android] repeat, muted, volume properties fully working --- Video.js | 9 +- android/RCTVideo.iml | 34 ++-- android/build.gradle | 1 + .../react/ReactVideoViewManager.java | 177 +++++++++--------- 4 files changed, 116 insertions(+), 105 deletions(-) diff --git a/Video.js b/Video.js index 86a7c48d..423f3e77 100644 --- a/Video.js +++ b/Video.js @@ -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); diff --git a/android/RCTVideo.iml b/android/RCTVideo.iml index 000f380b..389b183f 100644 --- a/android/RCTVideo.iml +++ b/android/RCTVideo.iml @@ -13,8 +13,11 @@