通过一个发件人控制多个Chromecast接收器? [英] Controlling multiple Chromecast Receivers from one Sender?

查看:92
本文介绍了通过一个发件人控制多个Chromecast接收器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以编写一个Chrome扩展程序(或Android应用程序)来创建多个发件人,每个发件人都连接到不同的收件人?

Is it possible to write a Chrome extension (or Android app) that creates multiple Senders, each connecting to a different Receiver?

换句话说,我需要构建一个界面,操作员可以通过该界面控制附近多个Chromecast上的流-每个Chromecast都将播放不同的视频流.

In other words, I need to build an interface from which an operator can control the streams on multiple different Chromecasts in the vicinity - each will be playing a different video stream.

我从其他帖子中了解到chrome.cast API不允许这样做-Chrome扩展程序只能充当单个发件人?这个限制似乎是任意的-我读到某个地方有人可以通过运行两个不同版本的Chrome来控制两个设备,因此,如果Chrome API中存在此限制,那不是由于基础协议的任何限制,对吗? (那是什么政治?)

I understand from other posts that the chrome.cast API does not allow for this - that the Chrome extension may acts as a single Sender only? This restriction seems arbitrary - I read somewhere that someone was able to control two devices by running two different versions of Chrome, so if this restriction exists in the Chrome API, it's not due to any limitation of the underlying protocol, correct? (what then, politics?)

是否存在一个较低级别的API(也许在Android上?),该API允许您创建多个发件人并将它们连接到不同的收件人?

Is there a lower-level API (perhaps on Android?) that would permit you to create multiple Senders and connect them to different Receivers?

我已经看到一些应用程序(例如Videostream)在您关闭发件人后似乎仍可以在Receiver上继续运行.可能有可能(例如)一次在多个设备上启动Receiver应用程序,让它们标识自己的身份并连接到本地网络服务器,例如通过WebSockets,然后让我的网络服务器将消息发送到那些Receiver应用程序,以要求他们更改视频流?

I've seen some apps (such as Videostream) which appear to continue to run on the Receiver after you've closed the Sender. Might it be possible to, for example, launch a Receiver app on multiple devices, one at a time, have them identify themselves and connect to a local webserver, e.g. via WebSockets, and then have my webserver send messages to those Receiver apps to ask them to change videostreams?

作为最后的手段,是否存在对底层协议的开放规范?

As a last resort, is there an open specification of the underlying protocol?

推荐答案

没有什么可以阻止您编写连接到chromecast,启动应用程序然后与该设备断开连接的发件人应用程序,同时让chromecast继续运行应用程序;您需要确保在检测到没有连接的设备时不要停止接收器.然后,在发送方,您可以重复相同的过程,但是这次连接到第二个设备,依此类推.要记住的重要一点是,发送方设备不能保持与多个设备的多个并发连接(MediaRouter是全局实例);这意味着您将无法从不同的Cast设备接收消息(状态更新等),但您当时直接连接的设备除外.此外,没有什么可以阻止其他用户连接到这些设备之一并启动其他应用程序的.

There is nothing to stop you from writing a sender app that connects to a chromecast, launches an app and then disconnects from that device while letting the chromecast continue running the app; you would need to make sure that you do not stop the receiver when it detects that there are no connected devices. Then, on the sender side, you can repeat the same process but this time connect to a second device and so on. The important thing to keep in mind is that your sender device cannot hold multiple concurrent connections to multiple devices (MediaRouter is a global instance); this means you cannot receive messages (status updates, etc) from different Cast devices except the one you are directly connected to at that time. Also, there is nothing to stop a different user to connect to one of these devices and launch a different app.

要回答您的其他问题,底层协议未打开.

To answer your other question, the underlying protocol is not open.

这篇关于通过一个发件人控制多个Chromecast接收器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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