Loading RCTVideo.m +8 −1 Changes for RCTVideo.m: 8 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ static NSString *const playbackLikelyToKeepUpKeyPath = @"playbackLikelyToKeepUp" BOOL _muted; BOOL _paused; BOOL _repeat; BOOL _playInBackground; NSString * _resizeMode; } Loading @@ -48,6 +49,7 @@ static NSString *const playbackLikelyToKeepUpKeyPath = @"playbackLikelyToKeepUp" _pendingSeek = false; _pendingSeekTime = 0.0f; _lastSeekTime = 0.0f; _playInBackground = false; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillResignActive:) Loading @@ -72,7 +74,7 @@ static NSString *const playbackLikelyToKeepUpKeyPath = @"playbackLikelyToKeepUp" - (void)applicationWillResignActive:(NSNotification *)notification { if (!_paused) { if (!_paused && !_playInBackground) { [self stopProgressTimer]; [_player setRate:0.0]; } Loading Loading @@ -285,6 +287,11 @@ static NSString *const playbackLikelyToKeepUpKeyPath = @"playbackLikelyToKeepUp" _playerLayer.videoGravity = mode; } - (void)setPlayInBackground:(BOOL)playInBackground { _playInBackground = playInBackground; } - (void)setPaused:(BOOL)paused { if (paused) { Loading RCTVideoManager.m +1 −0 Changes for RCTVideoManager.m: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ RCT_EXPORT_VIEW_PROPERTY(repeat, BOOL); RCT_EXPORT_VIEW_PROPERTY(paused, BOOL); RCT_EXPORT_VIEW_PROPERTY(muted, BOOL); RCT_EXPORT_VIEW_PROPERTY(volume, float); RCT_EXPORT_VIEW_PROPERTY(playInBackground, BOOL); RCT_EXPORT_VIEW_PROPERTY(rate, float); RCT_EXPORT_VIEW_PROPERTY(seek, float); Loading Video.ios.js +1 −0 Changes for Video.ios.js: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ var Video = React.createClass({ muted: PropTypes.bool, volume: PropTypes.number, rate: PropTypes.number, playInBackground: PropTypes.bool, onLoadStart: PropTypes.func, onLoad: PropTypes.func, onError: PropTypes.func, Loading Loading
RCTVideo.m +8 −1 Changes for RCTVideo.m: 8 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ static NSString *const playbackLikelyToKeepUpKeyPath = @"playbackLikelyToKeepUp" BOOL _muted; BOOL _paused; BOOL _repeat; BOOL _playInBackground; NSString * _resizeMode; } Loading @@ -48,6 +49,7 @@ static NSString *const playbackLikelyToKeepUpKeyPath = @"playbackLikelyToKeepUp" _pendingSeek = false; _pendingSeekTime = 0.0f; _lastSeekTime = 0.0f; _playInBackground = false; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillResignActive:) Loading @@ -72,7 +74,7 @@ static NSString *const playbackLikelyToKeepUpKeyPath = @"playbackLikelyToKeepUp" - (void)applicationWillResignActive:(NSNotification *)notification { if (!_paused) { if (!_paused && !_playInBackground) { [self stopProgressTimer]; [_player setRate:0.0]; } Loading Loading @@ -285,6 +287,11 @@ static NSString *const playbackLikelyToKeepUpKeyPath = @"playbackLikelyToKeepUp" _playerLayer.videoGravity = mode; } - (void)setPlayInBackground:(BOOL)playInBackground { _playInBackground = playInBackground; } - (void)setPaused:(BOOL)paused { if (paused) { Loading
RCTVideoManager.m +1 −0 Changes for RCTVideoManager.m: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ RCT_EXPORT_VIEW_PROPERTY(repeat, BOOL); RCT_EXPORT_VIEW_PROPERTY(paused, BOOL); RCT_EXPORT_VIEW_PROPERTY(muted, BOOL); RCT_EXPORT_VIEW_PROPERTY(volume, float); RCT_EXPORT_VIEW_PROPERTY(playInBackground, BOOL); RCT_EXPORT_VIEW_PROPERTY(rate, float); RCT_EXPORT_VIEW_PROPERTY(seek, float); Loading
Video.ios.js +1 −0 Changes for Video.ios.js: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ var Video = React.createClass({ muted: PropTypes.bool, volume: PropTypes.number, rate: PropTypes.number, playInBackground: PropTypes.bool, onLoadStart: PropTypes.func, onLoad: PropTypes.func, onError: PropTypes.func, Loading