Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

实现后台播放功能,增加后台播放示例 #2198

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

XuQK
Copy link

@XuQK XuQK commented Nov 22, 2018

麻烦重点关注下我对库里那两个类的修改会不会有什么不好的影响

@lipangit
Copy link
Owner

image

咱们的MediaPlayer是在TextureView生成之后开始的,这行应该去掉的吧

@XuQK
Copy link
Author

XuQK commented Nov 22, 2018

前面两行移上去是因为在后台播放时,通过notificaton从视频A切换到视频B的时候,B要在Activity Resume后才开始播放,加上第三行是因为不加的话,视频播放就会报NPE:

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.MediaPlayer.setSurface(android.view.Surface)' on a null object reference
        at cn.jzvd.JZMediaSystem.setSurface(JZMediaSystem.java:98)
        at cn.jzvd.JZMediaManager$MediaHandler.handleMessage(JZMediaManager.java:193)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:159)
        at android.os.HandlerThread.run(HandlerThread.java:61)

@lipangit
Copy link
Owner

就是说B其实是后台播放的,后台播放没有textureView的init,然后就不会启动MediaPlayer是吗,B就无法播放是吗?

@lipangit
Copy link
Owner

进群加我qq,把你拉到开发者群里

@lipangit
Copy link
Owner

你好,咱们项目推出数字通证饺子token,https://github.com/lipangit/JZT, 给所有提交过pr的朋友30000个JZT,表示对你过去对项目支持的感谢。
请下载币威钱包https://www.bitcv.app/,把里面的以太坊地址给我,币威的地址站内转账不需要手续费。这东西值不值钱不重要,玩的是信仰。
Hello, let's launch the JiaoZiToken, https://github.com/lipangit/JZT, and give all the friends who submitted pr 30,000 JZT, thank you for your support of the project.
Please download the coin wallet https://www.bitcv.app/ and give me the address of the Ethereum. There is no charge for transferring money at the address station. It is not important that the value of this thing is worthless. It is faith.

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

Successfully merging this pull request may close these issues.

None yet

2 participants