How to join an existing activity playing media in chrome app

末鹿安然 提交于 2021-01-28 03:05:15

问题


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..

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

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


回答1:


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

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.

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

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



来源:https://stackoverflow.com/questions/18708490/how-to-join-an-existing-activity-playing-media-in-chrome-app

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