jiajunhui / PlayerBase

The basic library of Android player will process complex business components. The access is simple。Android播放器基础库,专注于播放视图组件的高复用性和组件间的低耦合,轻松处理复杂业务。
Apache License 2.0
2.92k stars 437 forks source link

无缝播放 #99

Closed wxjer closed 4 years ago

wxjer commented 5 years ago

场景:闪屏Activity A里的视频到了B Activity页面继续播放,然后播放2s后缩小至B页面的一个recyclerview里面的item里继续播放。 切换思路就是通过ViewGroup.addview来添加播放器,第一次切换(A->B)没问题,B->item就不行了,log显示onSurfaceTextureUpdated是有新的SurfaceTexture,debug item里面是有播放器的,但是不显示任何东西。 求点解题思路

jiajunhui commented 5 years ago

是用RelationAssist处理的吗

wxjer commented 5 years ago

没,代码是一样的 移除自己parent,然后添加到新的container 播放器是自己的ijk和exo2019年9月10日 下午9:06,贾俊辉 notifications@github.com写道:是用RelationAssist处理的吗

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

jiajunhui commented 5 years ago

重新add时会经历detach和attach,应该是在重新attach后Surface没有设置上