【发布时间】:2015-01-22 15:03:19
【问题描述】:
根据
https://developers.google.com/cast/docs/design_checklist#sender-control-end
Sender stops cast
Content which is cast to a TV continues playing until either the last
connected sender disconnects, or until a sender casts something new.
Required
A When the last or only sender is connected to a receiver, tapping
Disconnect stops the app running on the receiver, and either
continues playing or pauses on the sender device.
我正在使用 Google 的 castcompanionlibrary。
如果我这样做
mgr.setStopOnDisconnect(false);
当最后一个发送者断开连接时,它不会停止接收者应用程序。如果我将其设置为true,它会停止接收者应用程序,即使它不是唯一连接的发送者应用程序。
我需要在发送方应用程序中执行什么操作,以便它仅在最后一个发送方断开连接时停止接收方应用程序?也就是说,当用户想要断开连接时,我需要检查我是否是当前连接的最后一个/唯一的发送方应用,如果是,请先停止接收方应用,然后断开连接。
【问题讨论】:
标签: android chromecast