Chromecast接收器,如何在没有显式强制发送者请求的情况下加载媒体? [英] Chromecast receiver, how to load media without explicit cast sender request?

查看:83
本文介绍了Chromecast接收器,如何在没有显式强制发送者请求的情况下加载媒体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在演员接收器上播放的外部服务器上存在媒体( Google的CastReferencePlayer <的修改版)。接收方一直与该服务器保持通信(通过长轮询),并在需要播放某些媒体文件时由服务器指示。

Media exists on an external server that I would like to play on my cast receiver (a modified version of Google's CastReferencePlayer). The receiver is in constant communication with this server (via long-polling), and is instructed by the server when it needs to play a certain media file.

问题一我需要的是接收者能够从本质上讲述自己来播放这种媒体。这违反了标准的发送方-接收方通信协议,但是对于我的应用程序是必需的,并且我不认为请求太怪异。

The issue I'm having is that I need the receiver to be able to essentially "tell itself" to play this media. This breaks with the standard sender-receiver communication protocol, but is necessary for my application and I don't believe too outlandish of a request.

据我所知, MediaManager 对象自动接收来自演员发送者的所有播放请求媒体。我正在寻找一种方法,可以挂接到MediaManager上并告诉它播放某些媒体而不接收发送方的正式请求。

As I understand it, the MediaManager object automagically receives all requests from cast senders to play media. I am looking for a way to hook into the MediaManager and tell it to play certain media without receiving a formal request from a sender.

尽管进行了大量的搜索和阅读文档,我找不到执行此操作的方法。有人知道有什么方法可以做到这一点吗?

Despite a lot of searching and reading through documentation, I can't find a way to do this. Does anyone know of any way to accomplish this?

推荐答案

我在google plus chromecast开发人员页面上看到了此消息,尽管我还没有开始使用它

i saw this on the google plus chromecast dev page, though i havent gotten it to work yet

使用以下方法添加/删除项目: https://developers.google.com/cast/docs/reference/receiver/cast.receiver.MediaManager#insertQueueItems https://developers.google.com/cast/docs/reference/receiver/cast.receiver.MediaManager#removeQueueItems

Add/remove items using: https://developers.google.com/cast/docs/reference/receiver/cast.receiver.MediaManager#insertQueueItems, https://developers.google.com/cast/docs/reference/receiver/cast.receiver.MediaManager#removeQueueItems

这篇关于Chromecast接收器,如何在没有显式强制发送者请求的情况下加载媒体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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