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

PlayerFactory.setPlayManager(SystemPlayerManager.class);播放本地录制视频,返回时报这个莫名其妙的崩溃 #2873

Closed
xianhe005 opened this issue Jul 30, 2020 · 3 comments

Comments

@xianhe005
Copy link

java.lang.IllegalStateException
at android.media.MediaPlayer.getVideoHeight(Native Method)
at tv.danmaku.ijk.media.player.AndroidMediaPlayer.getVideoHeight(AndroidMediaPlayer.java:201)
at com.shuyu.gsyvideoplayer.player.SystemPlayerManager.getVideoHeight(SystemPlayerManager.java:171)
at com.shuyu.gsyvideoplayer.GSYVideoBaseManager.getVideoHeight(GSYVideoBaseManager.java:486)
at com.shuyu.gsyvideoplayer.video.base.GSYVideoView.getCurrentVideoHeight(GSYVideoView.java:224)
at com.shuyu.gsyvideoplayer.video.base.GSYBaseVideoPlayer.isVerticalVideo(GSYBaseVideoPlayer.java:493)
at com.shuyu.gsyvideoplayer.video.base.GSYBaseVideoPlayer.isVerticalFullByVideoSize(GSYBaseVideoPlayer.java:546)
at com.shuyu.gsyvideoplayer.utils.OrientationUtils$1.onOrientationChanged(OrientationUtils.java:55)
at android.view.OrientationEventListener$SensorEventListenerImpl.onSensorChanged(OrientationEventListener.java:157)
at android.hardware.SystemSensorManager$SensorEventQueue.dispatchSensorEvent(SystemSensorManager.java:851)

@CarGuo
Copy link
Owner

CarGuo commented Jul 30, 2020

请提供测试视频

@xianhe005
Copy link
Author

在以下依赖情况:
implementation 'com.shuyu:GSYVideoPlayer:7.1.2'
将设置为系统内核:PlayerFactory.setPlayManager(SystemPlayerManager.class);
在你的demo中点击首页中-内核切换至“系统内核”,然后点击“简单播放”->"简单直接播放",进出两次必崩。

@CarGuo
Copy link
Owner

CarGuo commented Aug 4, 2020

我这边没有复现,但是问题应该在于 PlayerManager 在 release 时,没有把 MediaPlayer 设置为空
下个版本修复这个问题,如果等不及可以自己继承 SystemPlayerManager,然后处理下 2829be0

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