Skip to content

Commit

Permalink
Add scrollIntoTheCell property
Browse files Browse the repository at this point in the history
  • Loading branch information
changsanjiang committed Feb 23, 2018
1 parent 79e6017 commit b1ef00b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Binary file not shown.
3 changes: 2 additions & 1 deletion SJBaseVideoPlayer/SJBaseVideoPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ NS_ASSUME_NONNULL_BEGIN

@interface SJBaseVideoPlayer (ScrollView)

@property (nonatomic, assign, readonly) BOOL playOnCell;
@property (nonatomic, assign, readonly) BOOL playOnCell; // 是在cell上播放
@property (nonatomic, assign, readonly) BOOL scrollIntoTheCell; // 播放器滚进了单元格中

@end

Expand Down
8 changes: 6 additions & 2 deletions SJBaseVideoPlayer/SJBaseVideoPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ - (void)setAsset:(SJVideoPlayerAssetCarrier *)asset {
}
};

self.asset.playerItemStateChanged(asset, asset.playerItem.status); // update

self.asset.playerItemStateChanged(asset, asset.playerItem.status);
self.asset.playTimeChanged = ^(SJVideoPlayerAssetCarrier * _Nonnull asset, NSTimeInterval currentTime, NSTimeInterval duration) {
__strong typeof(_self) self = _self;
if ( !self ) return;
Expand Down Expand Up @@ -1133,6 +1133,10 @@ - (BOOL)playOnCell {
return self.asset.indexPath ? YES : NO;
}

- (BOOL)scrollIntoTheCell {
return self.scrollIn;
}

@end


Expand Down

0 comments on commit b1ef00b

Please sign in to comment.