Loading RCTVideo.m +9 −2 Changes for RCTVideo.m: 9 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ static NSString *const playbackBufferEmptyKeyPath = @"playbackBufferEmpty"; BOOL _paused; BOOL _repeat; BOOL _playInBackground; BOOL _playWhenInactive; NSString * _resizeMode; BOOL _fullscreenPlayerPresented; UIViewController * _presentingViewController; Loading @@ -57,6 +58,7 @@ static NSString *const playbackBufferEmptyKeyPath = @"playbackBufferEmpty"; _controls = NO; _playerBufferEmpty = YES; _playInBackground = false; _playWhenInactive = false; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillResignActive:) Loading Loading @@ -124,11 +126,11 @@ static NSString *const playbackBufferEmptyKeyPath = @"playbackBufferEmpty"; - (void)applicationWillResignActive:(NSNotification *)notification { if (!_paused && !_playInBackground) { if (_playInBackground || _playWhenInactive || _paused) return; [_player pause]; [_player setRate:0.0]; } } - (void)applicationDidEnterBackground:(NSNotification *)notification { Loading Loading @@ -371,6 +373,11 @@ static NSString *const playbackBufferEmptyKeyPath = @"playbackBufferEmpty"; _playInBackground = playInBackground; } - (void)setPlayWhenInactive:(BOOL)playWhenInactive { _playWhenInactive = playWhenInactive; } - (void)setPaused:(BOOL)paused { if (paused) { 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 @@ -21,6 +21,7 @@ var Video = React.createClass({ volume: PropTypes.number, rate: PropTypes.number, playInBackground: PropTypes.bool, playWhenInactive: PropTypes.bool, onLoadStart: PropTypes.func, onLoad: PropTypes.func, onError: PropTypes.func, Loading Video.js +1 −0 Changes for Video.js: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -187,6 +187,7 @@ Video.propTypes = { volume: PropTypes.number, rate: PropTypes.number, playInBackground: PropTypes.bool, playWhenInactive: PropTypes.bool, controls: PropTypes.bool, currentTime: PropTypes.number, onLoadStart: PropTypes.func, Loading Loading
RCTVideo.m +9 −2 Changes for RCTVideo.m: 9 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ static NSString *const playbackBufferEmptyKeyPath = @"playbackBufferEmpty"; BOOL _paused; BOOL _repeat; BOOL _playInBackground; BOOL _playWhenInactive; NSString * _resizeMode; BOOL _fullscreenPlayerPresented; UIViewController * _presentingViewController; Loading @@ -57,6 +58,7 @@ static NSString *const playbackBufferEmptyKeyPath = @"playbackBufferEmpty"; _controls = NO; _playerBufferEmpty = YES; _playInBackground = false; _playWhenInactive = false; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillResignActive:) Loading Loading @@ -124,11 +126,11 @@ static NSString *const playbackBufferEmptyKeyPath = @"playbackBufferEmpty"; - (void)applicationWillResignActive:(NSNotification *)notification { if (!_paused && !_playInBackground) { if (_playInBackground || _playWhenInactive || _paused) return; [_player pause]; [_player setRate:0.0]; } } - (void)applicationDidEnterBackground:(NSNotification *)notification { Loading Loading @@ -371,6 +373,11 @@ static NSString *const playbackBufferEmptyKeyPath = @"playbackBufferEmpty"; _playInBackground = playInBackground; } - (void)setPlayWhenInactive:(BOOL)playWhenInactive { _playWhenInactive = playWhenInactive; } - (void)setPaused:(BOOL)paused { if (paused) { 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 @@ -21,6 +21,7 @@ var Video = React.createClass({ volume: PropTypes.number, rate: PropTypes.number, playInBackground: PropTypes.bool, playWhenInactive: PropTypes.bool, onLoadStart: PropTypes.func, onLoad: PropTypes.func, onError: PropTypes.func, Loading
Video.js +1 −0 Changes for Video.js: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -187,6 +187,7 @@ Video.propTypes = { volume: PropTypes.number, rate: PropTypes.number, playInBackground: PropTypes.bool, playWhenInactive: PropTypes.bool, controls: PropTypes.bool, currentTime: PropTypes.number, onLoadStart: PropTypes.func, Loading