您如何使用MediaControllerCompat来控制当前播放器? [英] How do you use MediaControllerCompat to control the current player?
问题描述
我的应用不是媒体播放器.我只希望能够使用新的 MediaControllerCompat 控制当前的媒体播放器一个>类.目前,我正在使用 MediaSessionManager ,但想升级到新的compat类.
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.
当我没有令牌或MediaSessionCompat进行实例化时,如何实例化MediaControllerCompat类?我希望获得一些示例代码.
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.
推荐答案
我问了在MediaSessionCompat上录制视频的Google开发人员Ian Lake,他说这是不可能的(
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.
这篇关于您如何使用MediaControllerCompat来控制当前播放器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!