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

setDataSource报错 #146

Open
Huang0424 opened this issue Dec 17, 2021 · 0 comments
Open

setDataSource报错 #146

Huang0424 opened this issue Dec 17, 2021 · 0 comments

Comments

@Huang0424
Copy link

我在做RecyclerView 列表播放器功能
目前就是我想要在item被隐藏时调用 stopPlayback对播放器进行销毁操作

现在隐藏时调用stopPlayback后再去 执行setDataSource 会报错

java.lang.IllegalStateException
at android.media.MediaPlayer._reset(Native Method)
at android.media.MediaPlayer.reset(MediaPlayer.java:2242)
at com.kk.taurus.playerbase.player.SysMediaPlayer.reset(SysMediaPlayer.java:364)
at com.kk.taurus.playerbase.player.SysMediaPlayer.handleException(SysMediaPlayer.java:384)
at com.kk.taurus.playerbase.player.SysMediaPlayer.setSurface(SysMediaPlayer.java:161)
at com.kk.taurus.playerbase.AVPlayer.setSurface(AVPlayer.java:471)
at com.kk.taurus.playerbase.widget.BaseVideoView.setRenderType(BaseVideoView.java:351)
at com.kk.taurus.playerbase.widget.BaseVideoView.setDataSource(BaseVideoView.java:198)
at com.maiyawx.oa.pages.message.adapter.VideoProvider.changeVideoState(VideoProvider.java:129)
at com.maiyawx.oa.pages.message.adapter.VideoProvider$1.onClick(VideoProvider.java:40)
at android.view.View.performClick(View.java:6608)
at android.view.View.performClickInternal(View.java:6585)
at android.view.View.access$3100(View.java:785)
at android.view.View$PerformClick.run(View.java:25921)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6806)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)

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

1 participant