Domanda

The design checklist for "Sender stops cast" states

When the last or only sender is connected to a receiver, tapping Disconnect stops the app running on the receiver[...]

On iOS, GCKDeviceManager leaveApplication and stopApplication respectively leave the app or kill it but with no regards for other senders being connected or not.

How does a sender know it's the last one connected?

Edit: I'm not using the custom receiver

È stato utile?

Soluzione

Right now you will need to have your own receiver (i.e. custom receiver) to do that and use the api that Angel had mentioned. In future, we plan to update the Styled Receiver to include that logic. In fact, right now, you cannot distinguish between an explicit or implicit disconnect, so if you want to implement the disconnection logic correctly, you have to use a custom receiver and use a custom namespace to send a message to the receiver when an explicit disconnect is attempted. Next release will address that issue as well.

Altri suggerimenti

You can do it within your receiver with castReceiverManager.getSenders().length

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top