Commit e95271cb077c16205fb01ca153a6e5ce62ada182
1 parent
a150b5fc
no message
Showing
1 changed file
with
9 additions
and
0 deletions
CNLivePlayer/Classes/Player/CNLivePlayer.m
| @@ -246,6 +246,9 @@ | @@ -246,6 +246,9 @@ | ||
| 246 | CNLivePlayerModel *model = (CNLivePlayerModel *)data; | 246 | CNLivePlayerModel *model = (CNLivePlayerModel *)data; |
| 247 | if (![model isEmpty]) { | 247 | if (![model isEmpty]) { |
| 248 | [self createPlayerWithUrl:model.url]; | 248 | [self createPlayerWithUrl:model.url]; |
| 249 | + if(Player_TestEnvironment){ | ||
| 250 | + NSLog(@"CNLivePlayer初始化成功 --> 缓存数据"); | ||
| 251 | + } | ||
| 249 | success?success():@""; | 252 | success?success():@""; |
| 250 | } | 253 | } |
| 251 | // 无缓存 | 254 | // 无缓存 |
| @@ -300,6 +303,9 @@ | @@ -300,6 +303,9 @@ | ||
| 300 | } | 303 | } |
| 301 | if(!error){ | 304 | if(!error){ |
| 302 | [strongSelf createPlayerWithUrl:videoUrl]; | 305 | [strongSelf createPlayerWithUrl:videoUrl]; |
| 306 | + if(Player_TestEnvironment){ | ||
| 307 | + NSLog(@"CNLivePlayer初始化成功 --> 请求数据"); | ||
| 308 | + } | ||
| 303 | CNLivePlayerModel *model = [[CNLivePlayerModel alloc]initWithID:PlayerStringToKey(strongSelf->_videoId, strongSelf->_rate) url:videoUrl]; | 309 | CNLivePlayerModel *model = [[CNLivePlayerModel alloc]initWithID:PlayerStringToKey(strongSelf->_videoId, strongSelf->_rate) url:videoUrl]; |
| 304 | [[CNLivePlayerDBTool shared] insertTable:model]; | 310 | [[CNLivePlayerDBTool shared] insertTable:model]; |
| 305 | success?success():@""; | 311 | success?success():@""; |
| @@ -330,6 +336,9 @@ | @@ -330,6 +336,9 @@ | ||
| 330 | } | 336 | } |
| 331 | if(!error){ | 337 | if(!error){ |
| 332 | [strongSelf createPlayerWithUrl:videoUrl]; | 338 | [strongSelf createPlayerWithUrl:videoUrl]; |
| 339 | + if(Player_TestEnvironment){ | ||
| 340 | + NSLog(@"CNLivePlayer初始化成功 --> 请求数据"); | ||
| 341 | + } | ||
| 333 | CNLivePlayerModel *model = [[CNLivePlayerModel alloc]initWithID:PlayerStringToKey(strongSelf->_videoId, strongSelf->_rate) url:videoUrl]; | 342 | CNLivePlayerModel *model = [[CNLivePlayerModel alloc]initWithID:PlayerStringToKey(strongSelf->_videoId, strongSelf->_rate) url:videoUrl]; |
| 334 | [[CNLivePlayerDBTool shared] insertTable:model]; | 343 | [[CNLivePlayerDBTool shared] insertTable:model]; |
| 335 | success?success():@""; | 344 | success?success():@""; |