How do you use MediaControllerCompat to control the current player?

混江龙づ霸主 提交于 2019-12-22 04:32:23

问题


My app is not the media player. I just want to be able to control the current media player using the new MediaControllerCompat class. Currently I am using MediaSessionManager but want to upgrade to the new compat classes.

How do I instantiate the MediaControllerCompat class when I don't have a token or MediaSessionCompat to instantiate it with? I am hoping to get some example code.


回答1:


I asked Ian Lake, the Google dev who did the video on MediaSessionCompat, who said it is not possible (https://www.youtube.com/watch?v=FBC1FgWe5X4). We still have to use MediaSessionManager.



来源:https://stackoverflow.com/questions/36419424/how-do-you-use-mediacontrollercompat-to-control-the-current-player

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!