com.brightcove.player.event

## 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.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface android.os.Parcelable

      `android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static android.os.Parcelable.Creator<MediaEvent>` | `CREATOR` Creator for de-serializing media event from the given `Parcel`.
    `static int` | `PARCEL_OBJECT_TYPE` The type of the parcelable object.

    - ### Fields inherited from class com.brightcove.player.event.AbstractEvent

      `ACTIVITY, AD_ID, AD_TITLE, ALIGNMENT, ANDROID_VIEW, AUDIO_TRACKS_STATE, AUDIO_VARIANT, BOOLEAN, BRIGHTCOVE_CONTROL_BAR, BRIGHTCOVE_MEDIA_CONTROLLER, BUILD_VERSION, CAPTION_FORMAT, CAPTION_URI, CAPTIONS_STATE, CATALOG_URL, CEA608_DOCUMENT, CEA708_DOCUMENT, CONFIGURATION, CUE_POINT, CUE_POINTS, CURRENT_VIDEO, DEBUG, EMITTER, END_TIME, END_TIME_LONG, ERROR, ERROR_CODE, ERROR_EXTRA, ERROR_MESSAGE, ERROR_SUBCODE, ERRORS, EVENT_SOURCE, FORWARD_BUFFER_SECONDS, FRAGMENT, FROM_SEEK_POSITION, FROM_SEEK_POSITION_LONG, GSC_MAX_CONCURRENCY_REACHED_MESSAGE, ID, INDEX, INSTANCE_STATE, isPrevented, isStopped, LANGUAGES, LEFT_VOLUME, LINE, LINE_ANCHOR, LINE_TYPE, LIST, LIVE_WINDOW_DURATION, LIVE_WINDOW_DURATION_LONG, LOCALE_CODE, MAX_POSITION, MAX_POSITION_LONG, MEASURED_BPS, MEDIA_BYTES_TRANSFERRED, MEDIA_CONTROLLER_CONFIG, MIN_POSITION, MIN_POSITION_LONG, NEXT_VIDEO, ORIGINAL_EVENT, ORIGINAL_PLAYHEAD_POSITION, ORIGINAL_PLAYHEAD_POSITION_LONG, ORIGINAL_SEEK_POSITION, ORIGINAL_SEEK_POSITION_LONG, PERCENT_COMPLETE, PICTURE_IN_PICTURE_STATE, PLAYBACK_LOCATION, PLAYHEAD_POSITION, PLAYHEAD_POSITION_LONG, PLAYLIST, PLUGIN_NAME, POSITION, POSITION_ANCHOR, PROGRESS_BAR_PLAYHEAD_POSITION, PROGRESS_BAR_PLAYHEAD_POSITION_LONG, PROJECTION_FORMAT, RENDITION_HEIGHT, RENDITION_INDICATED_BPS, RENDITION_MIME_TYPE, RENDITION_URL, RENDITION_WIDTH, REQUEST_TOKEN, REQUESTED_ORIENTATION, RESPONSE_TIME_MS, RESTORE_SEEK_POSITION, RESTORE_SEEK_POSITION_LONG, RIGHT_VOLUME, SEEK_CONTROLS_VISIBILITY, SEEK_DEFAULT, SEEK_DEFAULT_LONG, SEEK_ON_HOLD_UPDATE_FREQ, SEEK_ON_HOLD_WAIT_TIME, SEEK_PERCENTAGE, SEEK_POSITION, SEEK_POSITION_LONG, SEEK_PROGRESS, SEEK_PROGRESS_LONG, SEEK_RELATIVE_ENABLED, SEGMENT_DURATION, SELECTED_TRACK, SIZE, SKIP_CUE_POINTS, SOURCE, START_TIME, START_TIME_LONG, SUPPORT_FRAGMENT, TEXT, TRACKS, TTML_DOCUMENT, type, UUID, VALUE, VIDEO, VIDEO_DURATION, VIDEO_DURATION_LONG, VIDEO_HEIGHT, VIDEO_STILL, VIDEO_WIDTH, VOLUME, WEBVTT_DOCUMENT`

    - ### Fields inherited from interface android.os.Parcelable

      `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MediaEvent(java.lang.String type)` Constructs a new media event for the specified type.
    `MediaEvent(java.lang.String type, java.util.Map<java.lang.String,android.os.Parcelable> properties)` Constructs a new media event for the specified type and properties.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static MediaEvent` | `create(Event event)` Converts the given non-parcelable event into a parcelable media event.
    `int` | `describeContents()`
    `java.util.Map<java.lang.String,android.os.Parcelable>` | `getProperties()`
    `void` | `writeToParcel(android.os.Parcel parcel, int i)`

    - ### Methods inherited from class com.brightcove.player.event.AbstractEvent

      `getId, getIntegerProperty, getLongProperty, getNextId, getProperty, getProperty, getType, isPrevented, isStopped, preventDefault, stopPropagation, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### PARCEL_OBJECT_TYPE

          public static final int PARCEL_OBJECT_TYPE

      The type of the parcelable object.
      See Also:
        Constant Field Values

    - #### CREATOR

          public static android.os.Parcelable.Creator<MediaEvent> CREATOR

      Creator for de-serializing media event from the given `Parcel`.

  - ### Constructor Detail

    - #### MediaEvent

          public MediaEvent(java.lang.String type)

      Constructs a new media event for the specified type.
      Parameters:
        `type` - the type of the media event.

    - #### MediaEvent

          public MediaEvent(java.lang.String type,
                            java.util.Map<java.lang.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 Detail

    - #### 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 java.util.Map<java.lang.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`