public class

MediaEvent

extends Object
java.lang.Object
   ↳ org.ocast.core.media.MediaEvent

Class Overview

Represents a media related event notified by the remote application. Can be an update of the playback status or a change of the metadata.

Summary

Public Constructors
MediaEvent(String name, JSONObject params)
Public Methods
static MediaEvent decode(JSONObject input)
Decodes the input json as a MediaEvent
String getName()
Gets the event name
JSONObject getParams()
Retrieves the data associated with the event
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MediaEvent (String name, JSONObject params)

Public Methods

public static MediaEvent decode (JSONObject input)

Decodes the input json as a MediaEvent

Returns
  • a MediaEvent
Throws
if the json is not correctly formatted
JSONException

public String getName ()

Gets the event name

Returns
  • the event name

public JSONObject getParams ()

Retrieves the data associated with the event

Returns
  • a JSONObject holding the event specific data