Loading RCTVideo.m +4 −3 Changes for RCTVideo.m: 4 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ static NSString *const statusKeyPath = @"status"; float _volume; float _rate; BOOL _muted; BOOL _paused; } - (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher { Loading Loading @@ -158,7 +159,6 @@ static NSString *const statusKeyPath = @"status"; [self startProgressTimer]; [self attachListeners]; [_player play]; [self applyModifiers]; } else if(_playerItem.status == AVPlayerItemStatusFailed) { [_eventDispatcher sendInputEventWithName:RNVideoEventLoadingError body:@{ Loading Loading @@ -186,7 +186,6 @@ static NSString *const statusKeyPath = @"status"; - (void)playerItemDidReachEnd:(NSNotification *)notification { AVPlayerItem *item = [notification object]; [item seekToTime:kCMTimeZero]; [_player play]; [self applyModifiers]; } Loading @@ -203,8 +202,9 @@ static NSString *const statusKeyPath = @"status"; } else { [self startProgressTimer]; [_player play]; } _paused = paused; } - (void)setSeek:(float)seekTime { Loading Loading @@ -265,6 +265,7 @@ static NSString *const statusKeyPath = @"status"; } [_player setRate:_rate]; [self setPaused:_paused]; } - (void)setRepeatEnabled { Loading RCTVideoManager.m +4 −2 Changes for RCTVideoManager.m: 4 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -51,10 +51,12 @@ RCT_EXPORT_VIEW_PROPERTY(seek, float); - (NSDictionary *)constantsToExport { return @{@"ScaleNone": AVLayerVideoGravityResizeAspect, return @{ @"ScaleNone": AVLayerVideoGravityResizeAspect, @"ScaleToFill": AVLayerVideoGravityResize, @"ScaleAspectFit": AVLayerVideoGravityResizeAspect, @"ScaleAspectFill": AVLayerVideoGravityResizeAspectFill}; @"ScaleAspectFill": AVLayerVideoGravityResizeAspectFill }; } @end Video.ios.js +0 −1 Changes for Video.ios.js: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ var deepDiffer = require('deepDiffer'); var Video = React.createClass({ propTypes: { // should probably be a shape source: PropTypes.object, style: StyleSheetPropType(VideoStylePropTypes), source: PropTypes.object, Loading package.json +1 −1 Changes for package.json: 1 added line, 1 removed line. Original line number Diff line number Diff line { "name": "react-native-video", "version": "0.3.2", "version": "0.3.3", "description": "A <Video /> element for react-native", "main": "Video.ios.js", "author": "Brent Vatne <brentvatne@gmail.com> (https://github.com/brentvatne)", Loading Loading
RCTVideo.m +4 −3 Changes for RCTVideo.m: 4 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ static NSString *const statusKeyPath = @"status"; float _volume; float _rate; BOOL _muted; BOOL _paused; } - (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher { Loading Loading @@ -158,7 +159,6 @@ static NSString *const statusKeyPath = @"status"; [self startProgressTimer]; [self attachListeners]; [_player play]; [self applyModifiers]; } else if(_playerItem.status == AVPlayerItemStatusFailed) { [_eventDispatcher sendInputEventWithName:RNVideoEventLoadingError body:@{ Loading Loading @@ -186,7 +186,6 @@ static NSString *const statusKeyPath = @"status"; - (void)playerItemDidReachEnd:(NSNotification *)notification { AVPlayerItem *item = [notification object]; [item seekToTime:kCMTimeZero]; [_player play]; [self applyModifiers]; } Loading @@ -203,8 +202,9 @@ static NSString *const statusKeyPath = @"status"; } else { [self startProgressTimer]; [_player play]; } _paused = paused; } - (void)setSeek:(float)seekTime { Loading Loading @@ -265,6 +265,7 @@ static NSString *const statusKeyPath = @"status"; } [_player setRate:_rate]; [self setPaused:_paused]; } - (void)setRepeatEnabled { Loading
RCTVideoManager.m +4 −2 Changes for RCTVideoManager.m: 4 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -51,10 +51,12 @@ RCT_EXPORT_VIEW_PROPERTY(seek, float); - (NSDictionary *)constantsToExport { return @{@"ScaleNone": AVLayerVideoGravityResizeAspect, return @{ @"ScaleNone": AVLayerVideoGravityResizeAspect, @"ScaleToFill": AVLayerVideoGravityResize, @"ScaleAspectFit": AVLayerVideoGravityResizeAspect, @"ScaleAspectFill": AVLayerVideoGravityResizeAspectFill}; @"ScaleAspectFill": AVLayerVideoGravityResizeAspectFill }; } @end
Video.ios.js +0 −1 Changes for Video.ios.js: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ var deepDiffer = require('deepDiffer'); var Video = React.createClass({ propTypes: { // should probably be a shape source: PropTypes.object, style: StyleSheetPropType(VideoStylePropTypes), source: PropTypes.object, Loading
package.json +1 −1 Changes for package.json: 1 added line, 1 removed line. Original line number Diff line number Diff line { "name": "react-native-video", "version": "0.3.2", "version": "0.3.3", "description": "A <Video /> element for react-native", "main": "Video.ios.js", "author": "Brent Vatne <brentvatne@gmail.com> (https://github.com/brentvatne)", Loading