This repository has been archived by the owner on Aug 9, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
说明:
1、ActivityRecyclerViewSeamlessPlay:无缝播放的列表页
2、DetailVideoSeamlessPlay : 无缝播放的详情页
3、列表进入详情已经实现了无缝播放,详情回到列表也实现了无缝播放,只是回来的时候全屏还要问题,原因是Context没有转换过来,这个我在代码里有注释。
4、另外,视频列表如果带有title信息,如我demo中的列表,这时候正在播放的视频划出屏幕要释放视频的判断不是很严谨,这个我也添加了代码。
原理:
1、列表进入详情:将正在播放的视频直接传到详情页,用详情页的容器去添加。由于该视频之前引用的Context是列表页的Context,所以详情页中进行相关视频的操作的时候要切换为详情页的Context。
2、详情返回列表:如上同理,需要将详情页中传过来的Context转换成列表页的Context,才能进行视频的相关操作。