Skip to content

Commit

Permalink
Fix refresh some problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
changsanjiang committed Mar 5, 2018
1 parent e5f0caa commit 144e9d4
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 56 deletions.
Binary file modified Project/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions Project/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PODS:
- SJUIFactory (0.0.15):
- SJUIFactory/Category (= 0.0.15)
- SJUIFactory/Category (0.0.15)
- SJVideoPlayerAssetCarrier (1.0.7)
- SJVideoPlayerAssetCarrier (1.0.7.2)
- SJVolBrigControl (0.0.4):
- Masonry
- SJBorderLineView
Expand Down Expand Up @@ -43,7 +43,7 @@ SPEC CHECKSUMS:
SJOrentationObserver: aacbb5eb1187b4b0180e409cc9358b0bbe5f5758
SJPrompt: eaecd94f2055a12d25090967dbad3f21da011626
SJUIFactory: 36f08c8bef27b2f6f123f7c3df1c1aeb1b750742
SJVideoPlayerAssetCarrier: 19650c24e18e4287ca696481a428946e9855496a
SJVideoPlayerAssetCarrier: 24f6ceb58a0601ecac38e36a442b557358436276
SJVolBrigControl: c8f8a6e8d56ff58bcebd2b77ec4b485b1802fff9

PODFILE CHECKSUM: ed87ebd55153c180bdddc27697dfd8d72f873c99
Expand Down
4 changes: 2 additions & 2 deletions Project/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 = '1.0.1.3'
s.version = '1.0.1.4'
s.summary = 'video player.'
s.description = 'https://github.com/changsanjiang/SJBaseVideoPlayer/blob/master/README.md'
s.homepage = 'https://github.com/changsanjiang/SJBaseVideoPlayer'
Expand Down
6 changes: 4 additions & 2 deletions SJBaseVideoPlayer/SJBaseVideoPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ - (void)dealloc {
#ifdef DEBUG
NSLog(@"%zd - %s", __LINE__, __func__);
#endif
if ( self.assetDeallocExeBlock ) self.assetDeallocExeBlock(self);
[_presentView removeFromSuperview];
[self stop];
}
Expand Down Expand Up @@ -826,8 +827,9 @@ - (void)playWithURL:(NSURL *)playURL jumpedToTime:(NSTimeInterval)time {

- (void)refresh {
if ( !self.asset ) return;
[self.URLAsset setValue:[[SJVideoPlayerAssetCarrier alloc] initWithAssetURL:self.asset.assetURL beginTime:self.asset.beginTime indexPath:self.asset.indexPath superviewTag:self.asset.superviewTag scrollViewIndexPath:self.asset.scrollViewIndexPath scrollViewTag:self.asset.scrollViewTag scrollView:self.asset.scrollView rootScrollView:self.asset.rootScrollView] forKey:kSJVideoPlayerAssetKey];
self.asset = [self.URLAsset valueForKey:kSJVideoPlayerAssetKey];
self.state = SJVideoPlayerPlayState_Unknown;
[self.asset refreshAVPlayer];
self.presentView.player = self.asset.player;
}

- (void)setAssetDeallocExeBlock:(void (^)(__kindof SJBaseVideoPlayer * _Nonnull))assetDeallocExeBlock {
Expand Down

0 comments on commit 144e9d4

Please sign in to comment.