Synopsis
Boolean publishMediaControlMessage(Object data, [Array<String> instanceIds])
Parameters
The Object data parameter is the transport control state payload sent to remote device(s). The data object has the following properties:
state – An integer constant corresponding to the followingKONtx.mediaplayer.constants.states:
-1012345678910timeindex – An integer representing the current time index in seconds.
duration – An integer representing the total duration of the current clip in seconds.
humanDuration – A String that is the total duration matching the onscreen duration display.
isControlOnScreen – A Boolean that is true if the overlay controls are currently onscreen, and false otherwise.
If the optional parameter instanceIds is specified,
the message should only be sent to the remote devices identified. No other devices receive the message. This parameter can
be a String for a single instanceId, an Array<String> of instanceIds or null.
If null, the message is sent to all connected remote devices that are subscribed to media transport control messages.
Returns
Returns true if sending the message is successful. Returns false otherwise.
Description
Helper method to publish a media transport control message. Send the media transport control state to subscribed (or identified) devices so they can update their media transport control displays.