Class MediaEvent

java.lang.Object
com.brightcove.player.event.AbstractEvent<android.os.Parcelable>
com.brightcove.player.event.MediaEvent
All Implemented Interfaces:
android.os.Parcelable

public class MediaEvent extends AbstractEvent<android.os.Parcelable> implements android.os.Parcelable
Immutable object the describes a media event.
  • Field Details

    • PARCEL_OBJECT_TYPE

      public static final int PARCEL_OBJECT_TYPE
      The type of the parcelable object.
      See Also:
    • CREATOR

      public static android.os.Parcelable.Creator<MediaEvent> CREATOR
      Creator for de-serializing media event from the given Parcel.
  • Constructor Details

    • MediaEvent

      public MediaEvent(String type)
      Constructs a new media event for the specified type.
      Parameters:
      type - the type of the media event.
    • MediaEvent

      public MediaEvent(String type, Map<String,android.os.Parcelable> properties)
      Constructs a new media event for the specified type and properties.
      Parameters:
      type - the type of the media event.
      properties - the properties related this media event.
  • Method Details

    • create

      public static MediaEvent create(@NonNull Event event)
      Converts the given non-parcelable event into a parcelable media event.
      Parameters:
      event - the event to be converted.
      Returns:
      reference to the equivalent media event.
    • getProperties

      @NonNull public Map<String,android.os.Parcelable> getProperties()
      Specified by:
      getProperties in class AbstractEvent<android.os.Parcelable>
    • describeContents

      public int describeContents()
      Specified by:
      describeContents in interface android.os.Parcelable
    • writeToParcel

      public void writeToParcel(android.os.Parcel parcel, int i)
      Specified by:
      writeToParcel in interface android.os.Parcelable