通用Android应用程序是否可以播放/暂停当前的chromecast媒体流? [英] Is it possible to play/pause the current chromecast media stream by a generic Android app?

查看:73
本文介绍了通用Android应用程序是否可以播放/暂停当前的chromecast媒体流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到解决办法。是否可以控制chromecast当前正在播放的媒体流,例如youtube,视频应用程序,音乐应用程序,或来自一般Android应用程序的任何内容?

I can't find a way to do this. is it possible to control the media stream that is current playing on chromecast, like youtube, video app, music app, or whatever from a generic Android application?

我已经尝试了很多方法来做到这一点,但我没有成功。例如,当我播放来自youtube的视频时,我可以加入chromecast并获取其会话ID和其他信息,但是我无法播放/暂停流式传输。

I've tried many ways to do it, but I had no success. I'm able to join the chromecast while it's playing a video from youtube for example and get it's session id and some other info, but I can't play/pause the streaming. Is it possible to do it?

预先感谢。

推荐答案

这在很大程度上取决于接收机上运行的应用程序;并非所有应用程序都使用Media名称空间(来自Cast SDK)进行控制;如果他们不这样做,您将无法做您尝试做的任何事情。如果这样做,那么您应该能够发送控制命令。

It very much depends on the application that is running on the receiver; not all applications use the Media namespace (from the Cast SDK) for control; if they don't, you will not be able to do anything of the sort that you are trying to do. If they do, then you should be able to send control commands.

这篇关于通用Android应用程序是否可以播放/暂停当前的chromecast媒体流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆