Commit 27f84b4745f3ae105e7c4c8ac186249263cb98e6

Authored by yanglingyu
1 parent 970d7db7

14系统图片不显示

CNLiveScioLive/Pages/Home/新闻详情/OldController/OldVideoDetailViewController.m
@@ -48,8 +48,8 @@ @@ -48,8 +48,8 @@
48 self->bgImg = [UIImage imageWithData:data]; 48 self->bgImg = [UIImage imageWithData:data];
49 dispatch_async(dispatch_get_main_queue(), ^{ 49 dispatch_async(dispatch_get_main_queue(), ^{
50 if (self.videoController && self->bgImg) { 50 if (self.videoController && self->bgImg) {
51 - self.videoController.view.contentMode=UIViewContentModeScaleAspectFit;  
52 - [self.videoController.view setBackgroundColor:[UIColor colorWithPatternImage:self->bgImg]]; 51 + self.videoController.view.contentMode=UIViewContentModeScaleToFill;
  52 + self.videoController.view.layer.contents = (__bridge id _Nullable) (self->bgImg.CGImage);
53 53
54 } 54 }
55 }); 55 });
@@ -341,13 +341,17 @@ @@ -341,13 +341,17 @@
341 self.videoController = [[ZXVideoPlayerController alloc] initWithFrame:frame]; 341 self.videoController = [[ZXVideoPlayerController alloc] initWithFrame:frame];
342 //增加播放器背景图片 342 //增加播放器背景图片
343 if (!(nil==bgImg)) { 343 if (!(nil==bgImg)) {
344 - self.videoController.view.contentMode=UIViewContentModeScaleAspectFit;  
345 - [self.videoController.view setBackgroundColor:[UIColor colorWithPatternImage:self->bgImg]]; 344 + self.videoController.view.contentMode=UIViewContentModeScaleToFill;
  345 + self.videoController.view.layer.contents = (__bridge id _Nullable)(self->bgImg.CGImage);
346 } 346 }
347 self.liveController.delegate = self; 347 self.liveController.delegate = self;
348 [self.videoController showInView:self.view]; 348 [self.videoController showInView:self.view];
349 349
350 __weak typeof(self) weakSelf = self; 350 __weak typeof(self) weakSelf = self;
  351 + self.videoController.videoPlayerShare = ^{
  352 + __strong typeof(self) strongSelf = weakSelf;
  353 + [strongSelf shareButtonTaped:strongSelf->_shareBtn];
  354 + };
351 self.videoController.videoPlayerGoBackBlock = ^{ 355 self.videoController.videoPlayerGoBackBlock = ^{
352 __strong typeof(self) strongSelf = weakSelf; 356 __strong typeof(self) strongSelf = weakSelf;
353 [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"ZXVideoPlayer_DidLockScreen"]; 357 [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"ZXVideoPlayer_DidLockScreen"];
CNLiveScioLive/Pages/Live/Controller/VideoPlayBackViewController.m
@@ -308,6 +308,10 @@ @@ -308,6 +308,10 @@
308 CGRect frame = CGRectMake(0, iPhoneX ? 44 : 0, MainScreenWidth, videoHeight); 308 CGRect frame = CGRectMake(0, iPhoneX ? 44 : 0, MainScreenWidth, videoHeight);
309 self.videoController = [[ZXVideoPlayerController alloc] initWithFrame:frame]; 309 self.videoController = [[ZXVideoPlayerController alloc] initWithFrame:frame];
310 __weak typeof(self) weakSelf = self; 310 __weak typeof(self) weakSelf = self;
  311 + self.videoController.videoPlayerShare = ^{
  312 + __strong typeof(self) strongSelf = weakSelf;
  313 + [strongSelf shareButtonTaped:strongSelf->_shareButton];
  314 + };
311 self.videoController.videoPlayerGoBackBlock = ^{ 315 self.videoController.videoPlayerGoBackBlock = ^{
312 __strong typeof(self) strongSelf = weakSelf; 316 __strong typeof(self) strongSelf = weakSelf;
313 [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"ZXVideoPlayer_DidLockScreen"]; 317 [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"ZXVideoPlayer_DidLockScreen"];
CNLiveScioLive/Pages/Tools/ZXVideoPlayer/Classes/ZXVideoPlayerController.h
@@ -24,6 +24,8 @@ @@ -24,6 +24,8 @@
24 @property (nonatomic, strong, readwrite) ZXVideo *video; 24 @property (nonatomic, strong, readwrite) ZXVideo *video;
25 /// 竖屏模式下点击返回 25 /// 竖屏模式下点击返回
26 @property (nonatomic, copy) void(^videoPlayerGoBackBlock)(void); 26 @property (nonatomic, copy) void(^videoPlayerGoBackBlock)(void);
  27 +
  28 +@property (nonatomic, copy) void (^videoPlayerShare)(void);
27 /// 将要切换到竖屏模式 29 /// 将要切换到竖屏模式
28 @property (nonatomic, copy) void(^videoPlayerWillChangeToOriginalScreenModeBlock)(void); 30 @property (nonatomic, copy) void(^videoPlayerWillChangeToOriginalScreenModeBlock)(void);
29 /// 将要切换到全屏模式 31 /// 将要切换到全屏模式
CNLiveScioLive/Pages/Tools/ZXVideoPlayer/Classes/ZXVideoPlayerController.m
No preview for this file type