16

Context

When casting from Google Chrome and using the session listener it's possible to join an already created session, this works well when the session is created from chrome, and if the autoJoinPolicy was set to ORIGIN_SCOPED it even works from a different tab.

The problem

If another device created a session the sessionListener handler doesn't fire, so I'm not able join the created session.

Between devices (android, ios) is possible to detect sessions, that the same behavior I would like to achieve with chrome, is this possible?

a--m
  • 4,716
  • 1
  • 39
  • 59

1 Answers1

0

You can connect to other sessions as well, it shouldn't be necessarily your own session. For example, you can check out the CastVideos-android and CastVideos-chrome sample apps and start a cast session with Android and then connect to that with the chrome app.

a--m
  • 4,716
  • 1
  • 39
  • 59
Ali Naddaf
  • 16,951
  • 2
  • 21
  • 28
  • Thank you for the input! The code is heavily based on those apps, but at the moment it doesn't work. I'll test the unmodified code to see if it matches the desired behaviour and post back for results. Probably I'm missing something. – a--m Mar 10 '14 at 18:32
  • 5
    sorry for the late reply, but it wasn't possible to test what you suggest before. **It simply doesn't work,** at least with the examples provided. When the stream is sent from chrome it's possible to capture the same session from android and control the playback from there, the same doesn't apply the other way around. Obviously I can overlap the session created by android and cast to the same chromecast device, but I cannot find a way to join that session. ¿Any other suggestions or hints? Thank you in advance. – a--m Mar 14 '14 at 16:07
  • @a--m did you make it work? I have the same problem. – Guilherme Simão Couto Jan 16 '19 at 16:13
  • @GuilhermeSimãoCouto This was a question I had back in 2014 when #google-cast was still in beta... By that time I could not find any solution to this problem and don't work anymore in that project, so I'm not of great help here. Hopefully, you could get some attention/support from Google engineers... – a--m Jan 16 '19 at 16:21
  • 1
    I also have this problem. I'd like to control the receiver app (chromecast) using multiple simultaneously connected senders (chrome browsers), but whenever I call requestSession, it causes the receiver app to relaunch (and thus end the existing session). I was able to avoid this by using requestSessionById instead, but this requires the sessionId of the first session created by the first device to be known in the other devices to do that... It feels kind of like a hack rather than a good solution. – Bert Regelink Jul 26 '20 at 15:24