How to listen for HDMI-CEC media controls events in receiver

与世无争的帅哥 提交于 2020-01-23 18:17:57

问题


Google recently announced that Chromecast now supports HDMI-CEC controls. https://plus.google.com/+LeonNicholls/posts/FyGeJavgmX3

I would like the implement the functionality in my app. I have tested with Youtube and my TV and it works. How can I implement the same thing in the receiver portion of my Chromecast app? I have tried listening for key events, but that doesn't seem to pick anything up. Any ideas?


回答1:


As long as you use the Media Manager on the receiver side (the recommended approach), you shouldn't need to do anything special.




回答2:


As stated in your article, it's basically only the Google Cast media namespace namespace that supports HDMI-CEC, so basically for custom receiver apps, the answer is no. For media namespace apps, just implement the API and it should work automatically.

I know the media HDMI-CEC support includes turning on the TV, switching to the ChromeCast input, pause and play. It's possible it also includes volume (including mute) and seeking as these are also media playback messages defined in that API.

It might be cool if you could use those buttons to control a custom receiver running on the CC but I suspect that the only way to do that is to generate a video in the sender and stream that to the CC, generating new video based on remote control interaction. I.e. An expensive and rather indirect way.

On the other hand - as a proof of concept maybe that would encourage google to open the HDMI-CEC API to non-media apps.



来源:https://stackoverflow.com/questions/29175638/how-to-listen-for-hdmi-cec-media-controls-events-in-receiver

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