Commit 59cde36eccbc2d0f9acfd8b6d98fdadd6dd8243a
1 parent
17196016
no message
Showing
1 changed file
with
10 additions
and
10 deletions
CNLiveScioLive/Pages/Home/新闻详情/OldController/OldVideoDetailViewController.m
| @@ -345,6 +345,14 @@ | @@ -345,6 +345,14 @@ | ||
| 345 | if (!self.videoController) { | 345 | if (!self.videoController) { |
| 346 | CGRect frame = CGRectMake(0, iPhoneX ? 44 : 0, MainScreenWidth, videoHeight); | 346 | CGRect frame = CGRectMake(0, iPhoneX ? 44 : 0, MainScreenWidth, videoHeight); |
| 347 | self.videoController = [[ZXVideoPlayerController alloc] initWithFrame:frame]; | 347 | self.videoController = [[ZXVideoPlayerController alloc] initWithFrame:frame]; |
| 348 | + //增加播放器背景图片 | ||
| 349 | + if (!(nil==bgImg)) { | ||
| 350 | + self.videoController.view.contentMode=UIViewContentModeScaleAspectFit; | ||
| 351 | + self.videoController.view.layer.contents=(__bridge id _Nullable)(bgImg.CGImage); | ||
| 352 | + } | ||
| 353 | + self.liveController.delegate = self; | ||
| 354 | + [self.videoController showInView:self.view]; | ||
| 355 | + | ||
| 348 | __weak typeof(self) weakSelf = self; | 356 | __weak typeof(self) weakSelf = self; |
| 349 | self.videoController.videoPlayerGoBackBlock = ^{ | 357 | self.videoController.videoPlayerGoBackBlock = ^{ |
| 350 | __strong typeof(self) strongSelf = weakSelf; | 358 | __strong typeof(self) strongSelf = weakSelf; |
| @@ -375,18 +383,11 @@ | @@ -375,18 +383,11 @@ | ||
| 375 | //CHINA ICONS | 383 | //CHINA ICONS |
| 376 | [CNLiveStat endEvent:@"gxzssc"]; | 384 | [CNLiveStat endEvent:@"gxzssc"]; |
| 377 | } | 385 | } |
| 386 | + | ||
| 378 | }; | 387 | }; |
| 379 | - | ||
| 380 | - //增加播放器背景图片 | ||
| 381 | - if (!(nil==bgImg)) { | ||
| 382 | - self.videoController.view.contentMode=UIViewContentModeScaleAspectFit; | ||
| 383 | - self.videoController.view.layer.contents=(__bridge id _Nullable)(bgImg.CGImage); | ||
| 384 | - } | ||
| 385 | - | ||
| 386 | - [self.videoController showInView:self.view]; | 388 | + |
| 387 | } | 389 | } |
| 388 | 390 | ||
| 389 | - | ||
| 390 | //时长统计开始 | 391 | //时长统计开始 |
| 391 | if ([_dictionary[@"cmsColumnId"] isEqualToString:@"spzl/djzw/"]) { | 392 | if ([_dictionary[@"cmsColumnId"] isEqualToString:@"spzl/djzw/"]) { |
| 392 | //记者问答 | 393 | //记者问答 |
| @@ -410,7 +411,6 @@ | @@ -410,7 +411,6 @@ | ||
| 410 | //CHINA ICONS | 411 | //CHINA ICONS |
| 411 | [CNLiveStat beginEvent:@"gxzssc"]; | 412 | [CNLiveStat beginEvent:@"gxzssc"]; |
| 412 | } | 413 | } |
| 413 | - | ||
| 414 | ZXVideo *video = [[ZXVideo alloc] init]; | 414 | ZXVideo *video = [[ZXVideo alloc] init]; |
| 415 | video.playUrl = url; | 415 | video.playUrl = url; |
| 416 | video.title = _dictionary[@"title"]; | 416 | video.title = _dictionary[@"title"]; |