Commit 74bb97df8579b3c837f335863992daecbe2ca979
1 parent
27efad8b
no message
Showing
2 changed files
with
4 additions
and
3 deletions
Example/CNLivePlayer/CNLiveAppDelegate.m
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions |
| 19 | { | 19 | { |
| 20 | // Override point for customization after application launch. | 20 | // Override point for customization after application launch. |
| 21 | - [CNLivePlayerManager setAppId:CNLivePlayer_AppId appKey:CNLivePlayer_AppKey isTestEnvironment:NO]; | 21 | + [CNLivePlayerManager setAppId:CNLivePlayer_AppId appKey:CNLivePlayer_AppKey isTestEnvironment:YES]; |
| 22 | 22 | ||
| 23 | return YES; | 23 | return YES; |
| 24 | } | 24 | } |
Example/CNLivePlayer/Player/CNLivePlayerController.m
| @@ -24,8 +24,9 @@ | @@ -24,8 +24,9 @@ | ||
| 24 | // Do any additional setup after loading the view. | 24 | // Do any additional setup after loading the view. |
| 25 | 25 | ||
| 26 | self.player = [[CNLivePlayer alloc]initVodPlayerWithVideoId:@"82_c8ff347048414b7295cef882f8361073" authSuccess:^{ | 26 | self.player = [[CNLivePlayer alloc]initVodPlayerWithVideoId:@"82_c8ff347048414b7295cef882f8361073" authSuccess:^{ |
| 27 | - self.player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*9/16.0); | ||
| 28 | - [self.player prepareToPlay]; | 27 | + |
| 28 | + _player.view.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*9/16.0); | ||
| 29 | + [_player prepareToPlay]; | ||
| 29 | } authFailure:^(NSDictionary * _Nonnull errorInfo) { | 30 | } authFailure:^(NSDictionary * _Nonnull errorInfo) { |
| 30 | 31 | ||
| 31 | }]; | 32 | }]; |