googlecast / CastVideos-android

Reference Android Sender w/ Framework API: CastVideos-android application shows how to cast videos from an Android device that is fully compliant with the Cast Design Checklist.
Apache License 2.0
345 stars 183 forks source link

On disconnecting/stopping ChromeCast from one device it is getting disconnected from both android devices #111

Open amrith009 opened 3 years ago

amrith009 commented 3 years ago

On disconnecting/stopping ChromeCast from one device it is getting disconnected from both android devices

1)Connect Android device 1 to chromecast and start streaming. 2)Connect Android device 2 to the same chromecast device.(Just keep connected) 3)Press Stop casting from Android device 2.

Expected Behaviour

1) Only Android device 2 should disconnect from the receiver without interrupting Android device 1 and content should playback continuously

Actual Behaviour

1) Playback is interrupted in chromecast and Android device 1 is also getting disconnected from the receiver

SashiWork commented 2 years ago

Hi,

I'm facing similar issue with different scenario, where I wanted the 1st device to disconnect when the 2nd device connected to Chromecast.

But when called below method it is disconnecting from both devices.

 castSession!!.setMessageReceivedCallbacks("urn:x-cast:com.example.cast"
        ) { castDevice, namespace, message ->
            castContext?.sessionManager?.endCurrentSession(true)
        }

if any solution/method available for this, please do let me know.

jaworskim commented 2 years ago

We were having the same issue in our app, so I've checked this Cast sample. Same issue exists here, when I have two senders, disconnecting one kills the receiver.

skyler91 commented 1 year ago

Seeing the same issue. Have any solutions/workarounds been found?