Skip to content

Commit

Permalink
修复新版控制层切换器在切换具有相同标识的控制层时无法切换的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
changsanjiang committed Apr 3, 2019
1 parent ec47acb commit 5bd6209
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SJVideoPlayer/Switcher/SJControlLayerSwitcher.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ - (instancetype)initWithPlayer:(__weak SJBaseVideoPlayer *)videoPlayer {
}

- (void)switchControlLayerForIdentitfier:(SJControlLayerIdentifier)identifier {
id<SJControlLayer> _Nullable oldValue = [self controlLayerForIdentifier:self.currentIdentifier];
id<SJControlLayer> _Nullable oldValue = (id)self.videoPlayer.controlLayerDataSource;
id<SJControlLayer> _Nullable newValue = [self controlLayerForIdentifier:identifier];
if ( !newValue && _resolveControlLayer ) {
newValue = _resolveControlLayer(identifier);
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ - (void)restartControlLayer {
sj_view_makeAppear(self.controlView, YES);
sj_view_makeAppear(_topContainerView, YES);
sj_view_makeAppear(_bottomContainerView, YES);
[_player controlLayerNeedAppear];
}

- (void)exitControlLayer {
Expand Down

0 comments on commit 5bd6209

Please sign in to comment.