AI-generated Key Takeaways
-
SenderDisconnectedEvent
is dispatched when a sender (like a phone or laptop) disconnects from the Cast receiver. -
It provides information about the disconnection, including the sender's ID, user agent, and the reason for disconnection.
-
This event extends the base
Event
class and includes properties likereason
,senderId
,type
, anduserAgent
. -
Developers can use this event to handle scenarios like pausing content or cleaning up resources when a sender disconnects.
cast.framework.system. SenderDisconnectedEvent
An event dispatched by cast.framework.CastReceiverContext when a sender is disconnected.
Constructor
SenderDisconnectedEvent
new SenderDisconnectedEvent(senderId, userAgent, reason)
Parameter |
|
---|---|
senderId |
string The sender ID. |
userAgent |
string The user agent. |
reason |
cast.framework.system.DisconnectReason The reason the sender was disconnected. Value must not be null. |
- Extends
- cast.framework.system.Event
Properties
reason
non-null cast.framework.system.DisconnectReason
The reason the sender was disconnected.
senderId
string
The ID of the disconnected sender.
type
non-null cast.framework.system.EventType
The event type.
- Inherited from
- cast.framework.system.Event#type
userAgent
string
The user agent of the sender.