如何在chrome应用程序中加入现有的活动播放媒体 [英] How to join an existing activity playing media in chrome app

查看:53
本文介绍了如何在chrome应用程序中加入现有的活动播放媒体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,假设您已经从iOS/Android/Web应用程序在接收器上启动了媒体,那么另一个Web应用程序如何才能加入此活动并控制媒体?我注意到演员表API中有一个"JOIN_ACTIVITY",但是目前没有任何使用它的东西.您也不知道要加入的活动的ID.

So assuming you've already launched media on the receiver from an iOS/Android/Web app, how can another web app join this activity and control the media? I noticed that the cast API has a 'JOIN_ACTIVITY' in it, but there's nothing that currently uses it. Nor do you know the activity's ID to join it..

这类似于如何检查如果ChromeCast会话已经在进行中,则此答案无助于连接到现有应用程序

This is similar to How to check if a ChromeCast Session is already in progress however, this answer does not help to connect to an existing application

但是,即使您知道自己的应用正在运行,使用javascript API,我也无法找到一种无需重新启动就可以连接到它的方法

However, using the javascript API, even if you know your app is running I can't find a way to connect to it without re-launching

推荐答案

我设法从Google工程团队那里得到了一些答案:

I managed to get some answers from the Google engineering team:

如果客户端启动,我们允许它们重新连接到同一会话来自相同的来源(即 http://www.somedomain.com:80/).我们不在V1协议栈中获得支持以在多个浏览器.我们可以对V1进行硬编码,例如映射应用ID的来源,但仍需要付出一些努力才能添加API也是如此.

We allow clients to reconnect to the same session if they are launched from the same origin (i.e. http://www.somedomain.com:80/). We don't have the support in the V1 protocol stack to implement this across multiple browsers. We can hard code something for V1 like mapping origins to app ids, but it will still be some eng effort to add the API support as well.

简而言之,Chrome SDK目前缺少Android和iOS的功能...希望很快就会出现.

In short, the functionality from Android and iOS is currently missing from the Chrome SDK... hope it comes out soon.

编辑:要进行更新,现在已经发布了官方公共SDK,现在支持此功能!

EDIT: To update this, now that the official public SDK has been released, this is now supported!

这篇关于如何在chrome应用程序中加入现有的活动播放媒体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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