Commit b778150f23c471bc63aa4a89aa1a18eab99df58b
1 parent
deaa02d1
no message
Showing
2 changed files
with
5 additions
and
3 deletions
CNLivePlayer/Classes/Player/CNLivePlayer.m
| @@ -278,7 +278,6 @@ NSString * const CNLiveHostStatusChangedNotification = @"CNLiveAnchorStatusChang | @@ -278,7 +278,6 @@ NSString * const CNLiveHostStatusChangedNotification = @"CNLiveAnchorStatusChang | ||
| 278 | } | 278 | } |
| 279 | if(contentId && ![contentId isEqualToString:@""]){ | 279 | if(contentId && ![contentId isEqualToString:@""]){ |
| 280 | _contentId = contentId; | 280 | _contentId = contentId; |
| 281 | - | ||
| 282 | } | 281 | } |
| 283 | _idName = @"vid"; | 282 | _idName = @"vid"; |
| 284 | _contentType = @"vod"; | 283 | _contentType = @"vod"; |
| @@ -689,7 +688,7 @@ NSString * const CNLiveHostStatusChangedNotification = @"CNLiveAnchorStatusChang | @@ -689,7 +688,7 @@ NSString * const CNLiveHostStatusChangedNotification = @"CNLiveAnchorStatusChang | ||
| 689 | if (reason != nil){ | 688 | if (reason != nil){ |
| 690 | NSInteger reasonAsInteger = [reason integerValue]; | 689 | NSInteger reasonAsInteger = [reason integerValue]; |
| 691 | if (PLAYER_TestEnvironment) { | 690 | if (PLAYER_TestEnvironment) { |
| 692 | - NSLog(@"CNLivePlayer-->播放器播放结束原因MPMovieFinishReason:%d", reasonAsInteger); | 691 | + NSLog(@"CNLivePlayer-->播放器播放结束原因MPMovieFinishReason:%ld", (long)reasonAsInteger); |
| 693 | } | 692 | } |
| 694 | switch (reasonAsInteger) { | 693 | switch (reasonAsInteger) { |
| 695 | case MPMovieFinishReasonPlaybackEnded: | 694 | case MPMovieFinishReasonPlaybackEnded: |
Example/CNLivePlayer/Player/CNLivePlayerController.m
| @@ -28,6 +28,7 @@ | @@ -28,6 +28,7 @@ | ||
| 28 | 28 | ||
| 29 | _player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*9/16.0); | 29 | _player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*9/16.0); |
| 30 | [_player prepareToPlay]; | 30 | [_player prepareToPlay]; |
| 31 | + | ||
| 31 | } authFailure:^(NSDictionary * _Nonnull errorInfo) { | 32 | } authFailure:^(NSDictionary * _Nonnull errorInfo) { |
| 32 | 33 | ||
| 33 | }]; | 34 | }]; |
| @@ -169,11 +170,13 @@ | @@ -169,11 +170,13 @@ | ||
| 169 | _player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*9/16.0); | 170 | _player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*9/16.0); |
| 170 | } | 171 | } |
| 171 | } | 172 | } |
| 173 | + | ||
| 172 | - (BOOL)shouldAutorotate{ | 174 | - (BOOL)shouldAutorotate{ |
| 173 | return YES; | 175 | return YES; |
| 174 | } | 176 | } |
| 177 | + | ||
| 175 | - (NSUInteger)supportedInterfaceOrientations{ | 178 | - (NSUInteger)supportedInterfaceOrientations{ |
| 176 | return UIInterfaceOrientationMaskAll; | 179 | return UIInterfaceOrientationMaskAll; |
| 177 | - | ||
| 178 | } | 180 | } |
| 181 | + | ||
| 179 | @end | 182 | @end |