Class: Message

  • cast.framework.system.Message objects represent custom messages received from a sender application.

  • Use cast.framework.CastReceiverContext#addCustomMessageListener to listen for these custom message events.

  • Messages contain a type (always "message"), a senderId, and a data payload with the message content.

Constructor

Message

new Message(type, senderId, data)

Parameter

type

string

The message type. It is always "message".

senderId

string

The sender ID.

data

any type

The message payload.

Value must not be null.

Properties

data

constant

non-null any type

The message payload.

senderId

constant

string

The sender ID.

type

The message type. It is always "message".