Skip to content

Commit

Permalink
Release 3.1.5
Browse files Browse the repository at this point in the history
- 解决 私有API调用的问题
- 解决 未正确释放第三方播放器的问题
  • Loading branch information
changsanjiang committed Nov 29, 2019
1 parent 9ea8269 commit ee85b7f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 101 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion SJBaseVideoPlayer.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'SJBaseVideoPlayer'
s.version = '3.1.4'
s.version = '3.1.5'
s.summary = 'video player.'
s.description = 'https://github.com/changsanjiang/SJBaseVideoPlayer/blob/master/README.md'
s.homepage = 'https://github.com/changsanjiang/SJBaseVideoPlayer'
Expand Down
2 changes: 1 addition & 1 deletion SJBaseVideoPlayer/AliVodPlayer/Core/SJAliyunVodPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ - (instancetype)initWithMedia:(__kindof SJAliyunVodModel *)media specifyStartTim

- (void)dealloc {
[NSNotificationCenter.defaultCenter removeObserver:self];
[_player stop];
[_player releasePlayer];
[_timer stop];
}

Expand Down
16 changes: 7 additions & 9 deletions SJBaseVideoPlayer/Common/Implements/SJRotationManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -469,19 +469,17 @@ - (BOOL)shouldAutorotateToOrientation:(UIDeviceOrientation)orientation {
}

- (void)fullscreenModeViewController:(SJFullscreenModeViewController *)vc willRotateToOrientation:(UIDeviceOrientation)orientation {
///
/// 修复 导航栏从后台进入前台后, 高度异常的问题
///
if ( orientation == UIDeviceOrientationPortrait || orientation == UIDeviceOrientationPortraitUpsideDown ) {
UINavigationController *nav = [self.superview lookupResponderForClass:UINavigationController.class];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
if ( [nav respondsToSelector:@selector(_updateBarsForCurrentInterfaceOrientation)] )
[nav performSelector:@selector(_updateBarsForCurrentInterfaceOrientation) onThread:NSThread.mainThread withObject:nil waitUntilDone:NO];
#pragma clang diagnostic pop
[self performSelector:@selector(_fixNavigationBarLayout) onThread:NSThread.mainThread withObject:@(NO) waitUntilDone:NO];
}
}

- (void)_fixNavigationBarLayout {
UINavigationController *nav = [self.superview lookupResponderForClass:UINavigationController.class];
[nav viewDidAppear:NO];
[nav.navigationBar layoutSubviews];
}

- (void)fullscreenModeViewController:(SJFullscreenModeViewController *)vc didRotateFromOrientation:(UIDeviceOrientation)orientation {
if ( !vc.isFullscreen ) {
UIView *snapshot = [self.target snapshotViewAfterScreenUpdates:NO];
Expand Down
4 changes: 4 additions & 0 deletions SJBaseVideoPlayer/IJKPlayer/SJIJKMediaPlaybackController.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ - (void)dealloc {
#ifdef DEBUG
NSLog(@"%d - %s", (int)__LINE__, __func__);
#endif
[self stop];
[NSNotificationCenter.defaultCenter removeObserver:self];
}

Expand All @@ -56,6 +57,7 @@ - (void)play {

- (void)prepareToPlay {
dispatch_async(dispatch_get_main_queue(), ^{
[self stop];
if ( self.media.mediaURL != nil ) {
self.player = [SJIJKMediaPlayer.alloc initWithURL:self.media.mediaURL specifyStartTime:self.media.specifyStartTime options:self.options];
}
Expand Down Expand Up @@ -90,6 +92,8 @@ - (void)stop {
[_definitionLoader cancel];
_definitionLoader = nil;
[self _removePeriodicTimeObserver];
[self.player stop];
[self.player shutdown];
self.player = nil;
}

Expand Down
22 changes: 0 additions & 22 deletions SJBaseVideoPlayer/UIViewController+SJRotationPrivate_FixSafeArea.h

This file was deleted.

68 changes: 0 additions & 68 deletions SJBaseVideoPlayer/UIViewController+SJRotationPrivate_FixSafeArea.m

This file was deleted.

0 comments on commit ee85b7f

Please sign in to comment.