Skip to content

Commit

Permalink
Up ListGSYVideoPlayer轮播场景焦点未移除导致播放器状态错误 (#3972)
Browse files Browse the repository at this point in the history
我这边的业务场景是进入视频页面自动播放,经过排查发现这个判断return调了导致再次进入视频页面不会自动播放,首次是正常的。
onAudioFocusChangeListener注册和移除应该是配对存在的,在这里加上这行代码可以解决我的问题。
  • Loading branch information
Hynsn committed Apr 9, 2024
1 parent ff4f7b8 commit 5748690
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ protected void resolveNormalVideoShow(View oldF, ViewGroup vp, GSYVideoPlayer gs
public void onCompletion() {
releaseNetWorkState();
if (mPlayPosition < (mUriList.size())) {
mAudioManager.abandonAudioFocus(onAudioFocusChangeListener);
return;
}
super.onCompletion();
Expand Down

0 comments on commit 5748690

Please sign in to comment.