Removed autoRotate from codebase; added TV_OS target check for
orientation; added tvOS target to examples/basic/ios project
This commit is contained in:
@@ -64,7 +64,6 @@ static int const RCTVideoUnset = -1;
|
||||
NSString * _ignoreSilentSwitch;
|
||||
NSString * _resizeMode;
|
||||
BOOL _fullscreen;
|
||||
BOOL _fullscreenAutorotate;
|
||||
NSString * _fullscreenOrientation;
|
||||
BOOL _fullscreenPlayerPresented;
|
||||
UIViewController * _presentingViewController;
|
||||
@@ -84,8 +83,7 @@ static int const RCTVideoUnset = -1;
|
||||
_rate = 1.0;
|
||||
_volume = 1.0;
|
||||
_resizeMode = @"AVLayerVideoGravityResizeAspectFill";
|
||||
_fullscreenAutorotate = YES;
|
||||
_fullscreenOrientation = @"default";
|
||||
_fullscreenOrientation = @"all";
|
||||
_pendingSeek = false;
|
||||
_pendingSeekTime = 0.0f;
|
||||
_lastSeekTime = 0.0f;
|
||||
@@ -128,7 +126,6 @@ static int const RCTVideoUnset = -1;
|
||||
RCTVideoPlayerViewController* viewController = [[RCTVideoPlayerViewController alloc] init];
|
||||
viewController.showsPlaybackControls = YES;
|
||||
viewController.rctDelegate = self;
|
||||
viewController.autorotate = _fullscreenAutorotate;
|
||||
viewController.preferredOrientation = _fullscreenOrientation;
|
||||
|
||||
viewController.view.frame = self.bounds;
|
||||
@@ -1109,7 +1106,7 @@ static int const RCTVideoUnset = -1;
|
||||
}
|
||||
|
||||
- (void)setFullscreen:(BOOL) fullscreen {
|
||||
if( fullscreen && !_fullscreenPlayerPresented )
|
||||
if( fullscreen && !_fullscreenPlayerPresented && _player )
|
||||
{
|
||||
// Ensure player view controller is not null
|
||||
if( !_playerViewController )
|
||||
@@ -1154,13 +1151,6 @@ static int const RCTVideoUnset = -1;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setFullscreenAutorotate:(BOOL)autorotate {
|
||||
_fullscreenAutorotate = autorotate;
|
||||
if (_fullscreenPlayerPresented) {
|
||||
_playerViewController.autorotate = autorotate;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setFullscreenOrientation:(NSString *)orientation {
|
||||
_fullscreenOrientation = orientation;
|
||||
if (_fullscreenPlayerPresented) {
|
||||
|
||||
Reference in New Issue
Block a user