Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

全屏模式下,看完一个视频,自动退出全屏,数据已经切换到写一个播放数据了,还是播放当前视频。非全屏模式下正常播放下一个 #493

Open
hudawei996 opened this issue Aug 11, 2023 · 2 comments

Comments

@hudawei996
Copy link

**什么jzvd版本
implementation 'com.google.android.exoplayer:exoplayer:2.19.0'
implementation 'cn.jzvd:jiaozivideoplayer:7.7.0'
**什么播放器内核

**相关log是什么

**demo是否有这个问题

**自己做了哪些修改

**如何操作复现

**什么安卓版本,什么机型
Android12
**截图或者视频说明情况
`
//log看到,video已经是另一个视频的数据传入了,这么操作还是播放上一个视频。
private void playerVideo(Video video,int screen){
videoId = video.getVideoId();
LogUtil.d("即将播放的videoId",videoId+"");
changePlayState(video,mPosition);
saveRecord(video);
Jzvd.releaseAllVideos();
Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_ADAPTER);

    JZDataSource dataSource = new JZDataSource(AppContext.picUrl()+video.getUrl(), "");

// vb.jzvdStd.setUp(dataSource,screen, JZMediaIjk.class); // 自带内核在部分机型会出现(1-1004)问题
// vb.jzvdStd.setUp(dataSource,screen); // 自带内核在部分机型会出现(1-1004)问题
vb.jzvdStd.setUp(dataSource,screen, JZMediaExo.class); // 自带内核在部分机型会出现(1-1004)问题

    vb.jzvdStd.posterImageView.setImageResource(R.mipmap.ic_placeholder_video);
    vb.jzvdStd.startVideo();
    vb.jzvdStd.setVideoPlayListener(this);
    vb.tvVideoCount.setText(video.getTitle()+" "+video.getSort());

}

`

@hudawei996 hudawei996 changed the title 全屏模式下,看完一个视频,自动退出全屏,数据已经切换到写一个播放数据了,还是播放当前视频 全屏模式下,看完一个视频,自动退出全屏,数据已经切换到写一个播放数据了,还是播放当前视频。非全屏模式下正常播放下一个 Aug 11, 2023
@hudawei996
Copy link
Author

//在以下类中
public class CustomJzvdStd extends JzvdStd {

@OverRide
public void gotoNormalCompletion() {
if(type == 0){
//解决方案,注释掉gobakFullscreenTime,就可以解决这个问题。具体为啥可以解决,看源代码没太理解,没找到到这个值
//的用的地方。
// gobakFullscreenTime = System.currentTimeMillis();//退出全屏
。。。
}

@Liberations
Copy link
Collaborator

if ((System.currentTimeMillis() - gobakFullscreenTime) < 200) { -- 180 | return; 181 | } 有个判断退出全屏跟播放下一个视频如果在200毫秒以内就忽略setUp... 具体为啥我也不清楚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants