问题
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