Commit deaa02d1d2d391682e9822995815bee8f615ef08
1 parent
ad686a44
no message
Showing
1 changed file
with
3 additions
and
5 deletions
Example/CNLivePlayer/Player/CNLivePlayerController.m
| @@ -152,21 +152,19 @@ | @@ -152,21 +152,19 @@ | ||
| 152 | if (orientation == UIInterfaceOrientationLandscapeRight) // home键靠右 | 152 | if (orientation == UIInterfaceOrientationLandscapeRight) // home键靠右 |
| 153 | { | 153 | { |
| 154 | _player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height); | 154 | _player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height); |
| 155 | - | ||
| 156 | } | 155 | } |
| 157 | 156 | ||
| 158 | - if (orientation ==UIInterfaceOrientationLandscapeLeft) // home键靠左 | 157 | + else if (orientation == UIInterfaceOrientationLandscapeLeft) // home键靠左 |
| 159 | { | 158 | { |
| 160 | _player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height); | 159 | _player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height); |
| 161 | } | 160 | } |
| 162 | 161 | ||
| 163 | - if (orientation == UIInterfaceOrientationPortrait) //home键靠下 | 162 | + else if (orientation == UIInterfaceOrientationPortrait) //home键靠下 |
| 164 | { | 163 | { |
| 165 | _player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*9/16.0); | 164 | _player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*9/16.0); |
| 166 | - | ||
| 167 | } | 165 | } |
| 168 | 166 | ||
| 169 | - if (orientation == UIInterfaceOrientationPortraitUpsideDown)//home键靠上 | 167 | + else if (orientation == UIInterfaceOrientationPortraitUpsideDown)//home键靠上 |
| 170 | { | 168 | { |
| 171 | _player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*9/16.0); | 169 | _player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*9/16.0); |
| 172 | } | 170 | } |