Commit bbdd9c95eedfce68bb3de7de6dd2217a2f721b29
1 parent
037497a1
关联类修改
Showing
3 changed files
with
11 additions
and
5 deletions
CNLiveScioLive/Pages/Home/新闻详情/Controller/VideoDetailViewController.m
| @@ -114,6 +114,11 @@ static NSString *newsLeftPicTableViewCell = @"CNLiveNewsLeftPicTableViewCell"; | @@ -114,6 +114,11 @@ static NSString *newsLeftPicTableViewCell = @"CNLiveNewsLeftPicTableViewCell"; | ||
| 114 | [self loadRelatedInformation]; | 114 | [self loadRelatedInformation]; |
| 115 | } | 115 | } |
| 116 | } | 116 | } |
| 117 | + | ||
| 118 | +- (void)dealloc | ||
| 119 | +{ | ||
| 120 | + self.liveController = nil; | ||
| 121 | +} | ||
| 117 | - (void)viewWillAppear:(BOOL)animated { | 122 | - (void)viewWillAppear:(BOOL)animated { |
| 118 | [super viewWillAppear:animated]; | 123 | [super viewWillAppear:animated]; |
| 119 | [[JGMusicManager shareMusicManager] playStop]; | 124 | [[JGMusicManager shareMusicManager] playStop]; |
| @@ -293,7 +298,7 @@ static NSString *newsLeftPicTableViewCell = @"CNLiveNewsLeftPicTableViewCell"; | @@ -293,7 +298,7 @@ static NSString *newsLeftPicTableViewCell = @"CNLiveNewsLeftPicTableViewCell"; | ||
| 293 | 298 | ||
| 294 | [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"ZXVideoPlayer_DidLockScreen"]; | 299 | [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"ZXVideoPlayer_DidLockScreen"]; |
| 295 | [strongSelf.liveController destroyPlayer]; | 300 | [strongSelf.liveController destroyPlayer]; |
| 296 | - strongSelf.liveController = nil; | 301 | +// strongSelf.liveController = nil; |
| 297 | [strongSelf goBack]; | 302 | [strongSelf goBack]; |
| 298 | }; | 303 | }; |
| 299 | } | 304 | } |
| @@ -381,7 +386,6 @@ static NSString *newsLeftPicTableViewCell = @"CNLiveNewsLeftPicTableViewCell"; | @@ -381,7 +386,6 @@ static NSString *newsLeftPicTableViewCell = @"CNLiveNewsLeftPicTableViewCell"; | ||
| 381 | [super viewWillDisappear:animated]; | 386 | [super viewWillDisappear:animated]; |
| 382 | [self.videoController stop]; | 387 | [self.videoController stop]; |
| 383 | [self.liveController stop]; | 388 | [self.liveController stop]; |
| 384 | - self.liveController = nil; | ||
| 385 | [self.navigationController setNavigationBarHidden:NO]; | 389 | [self.navigationController setNavigationBarHidden:NO]; |
| 386 | NSError *error = nil; | 390 | NSError *error = nil; |
| 387 | [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &error]; | 391 | [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &error]; |
CNLiveScioLive/Pages/Live/Controller/GraphicLiveViewController.m
| @@ -96,7 +96,7 @@ | @@ -96,7 +96,7 @@ | ||
| 96 | - (void)viewWillDisappear:(BOOL)animated { | 96 | - (void)viewWillDisappear:(BOOL)animated { |
| 97 | [super viewWillDisappear:animated]; | 97 | [super viewWillDisappear:animated]; |
| 98 | [self.liveController stop]; | 98 | [self.liveController stop]; |
| 99 | - self.liveController = nil; | 99 | +// self.liveController = nil; |
| 100 | [self.navigationController setNavigationBarHidden:NO]; | 100 | [self.navigationController setNavigationBarHidden:NO]; |
| 101 | } | 101 | } |
| 102 | 102 | ||
| @@ -179,6 +179,7 @@ | @@ -179,6 +179,7 @@ | ||
| 179 | 179 | ||
| 180 | - (void)dealloc { | 180 | - (void)dealloc { |
| 181 | [[NSNotificationCenter defaultCenter] removeObserver:self]; | 181 | [[NSNotificationCenter defaultCenter] removeObserver:self]; |
| 182 | + self.liveController = nil; | ||
| 182 | } | 183 | } |
| 183 | #pragma mark - UI | 184 | #pragma mark - UI |
| 184 | //- (void)setNaviation{ | 185 | //- (void)setNaviation{ |
| @@ -277,7 +278,7 @@ | @@ -277,7 +278,7 @@ | ||
| 277 | __strong typeof(self) strongSelf = weakSelf; | 278 | __strong typeof(self) strongSelf = weakSelf; |
| 278 | [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"ZXVideoPlayer_DidLockScreen"]; | 279 | [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"ZXVideoPlayer_DidLockScreen"]; |
| 279 | [strongSelf.liveController destroyPlayer]; | 280 | [strongSelf.liveController destroyPlayer]; |
| 280 | - strongSelf.liveController = nil; | 281 | +// strongSelf.liveController = nil; |
| 281 | [strongSelf Pop:nil]; | 282 | [strongSelf Pop:nil]; |
| 282 | }; | 283 | }; |
| 283 | } | 284 | } |
CNLiveScioLive/Pages/Live/Controller/VideoPlayBackViewController.m
| @@ -177,6 +177,7 @@ | @@ -177,6 +177,7 @@ | ||
| 177 | 177 | ||
| 178 | - (void)dealloc { | 178 | - (void)dealloc { |
| 179 | [[NSNotificationCenter defaultCenter] removeObserver:self]; | 179 | [[NSNotificationCenter defaultCenter] removeObserver:self]; |
| 180 | + self.liveController = nil; | ||
| 180 | } | 181 | } |
| 181 | 182 | ||
| 182 | - (void)viewWillAppear:(BOOL)animated { | 183 | - (void)viewWillAppear:(BOOL)animated { |
| @@ -207,7 +208,6 @@ | @@ -207,7 +208,6 @@ | ||
| 207 | - (void)viewWillDisappear:(BOOL)animated { | 208 | - (void)viewWillDisappear:(BOOL)animated { |
| 208 | [super viewWillDisappear:animated]; | 209 | [super viewWillDisappear:animated]; |
| 209 | [self.liveController stop]; | 210 | [self.liveController stop]; |
| 210 | - self.liveController = nil; | ||
| 211 | [self.navigationController setNavigationBarHidden:NO]; | 211 | [self.navigationController setNavigationBarHidden:NO]; |
| 212 | } | 212 | } |
| 213 | - (void)viewDidLoad { | 213 | - (void)viewDidLoad { |
| @@ -284,6 +284,7 @@ | @@ -284,6 +284,7 @@ | ||
| 284 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pausePlayer) name:@"PausePlayerNotification" object:nil]; | 284 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pausePlayer) name:@"PausePlayerNotification" object:nil]; |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | + | ||
| 287 | - (void)pausePlayer { | 288 | - (void)pausePlayer { |
| 288 | [self.liveController pause]; | 289 | [self.liveController pause]; |
| 289 | } | 290 | } |