Package com.google.android.exoplayer2.metadata.emsg

## Class EventMessage

- java.lang.Object
- - com.google.android.exoplayer2.metadata.emsg.EventMessage

- All Implemented Interfaces:
    `Parcelable`, `Metadata.Entry`

      public final class EventMessage
      extends Object
      implements Metadata.Entry

  An Event Message (emsg) as defined in ISO 23009-1.

- - ### Nested Class Summary

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

      `Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static Parcelable.Creator<EventMessage>` | `CREATOR` |
    `long` | `durationMs` | The duration of the event in milliseconds.
    `long` | `id` | The instance identifier.
    `static String` | `ID3_SCHEME_ID_AOM` | emsg scheme_id_uri from the CMAF spec.
    `byte[]` | `messageData` | The body of the message.
    `String` | `schemeIdUri` | The message scheme.
    `static String` | `SCTE35_SCHEME_ID` | scheme_id_uri from section 7.3.2 of SCTE 214-3 2015.
    `String` | `value` | The value for the event.

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

      `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EventMessage​(String schemeIdUri, String value, long durationMs, long id, byte[] messageData)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `describeContents()` |
    `boolean` | `equals​(Object obj)` |
    `byte[]` | `getWrappedMetadataBytes()` | Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata.
    `Format` | `getWrappedMetadataFormat()` | Returns the `Format` that can be used to decode the wrapped metadata in `Metadata.Entry.getWrappedMetadataBytes()`, or null if this Entry doesn't contain wrapped metadata.
    `int` | `hashCode()` |
    `String` | `toString()` |
    `void` | `writeToParcel​(Parcel dest, int flags)` |

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

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

    - ### Methods inherited from interface com.google.android.exoplayer2.metadata.Metadata.Entry

      `populateMediaMetadata`

- - ### Field Detail

    - #### ID3_SCHEME_ID_AOM

          public static final String ID3_SCHEME_ID_AOM

      emsg scheme_id_uri from the CMAF spec.
      See Also:
        Constant Field Values

    - #### SCTE35_SCHEME_ID

          public static final String SCTE35_SCHEME_ID

      scheme_id_uri from section 7.3.2 of SCTE 214-3 2015.
      See Also:
        Constant Field Values

    - #### schemeIdUri

          public final String schemeIdUri

      The message scheme.

    - #### value

          public final String value

      The value for the event.

    - #### durationMs

          public final long durationMs

      The duration of the event in milliseconds.

    - #### id

          public final long id

      The instance identifier.

    - #### messageData

          public final byte[] messageData

      The body of the message.

    - #### CREATOR

          public static final Parcelable.Creator<EventMessage> CREATOR

  - ### Constructor Detail

    - #### EventMessage

          public EventMessage​(String schemeIdUri,
                              String value,
                              long durationMs,
                              long id,
                              byte[] messageData)

      Parameters:
        `schemeIdUri` - The message scheme.
        `value` - The value for the event.
        `durationMs` - The duration of the event in milliseconds.
        `id` - The instance identifier.
        `messageData` - The body of the message.

  - ### Method Detail

    - #### getWrappedMetadataFormat

          @Nullable
          public Format getWrappedMetadataFormat()

      Description copied from interface: `Metadata.Entry`
      Returns the `Format` that can be used to decode the wrapped metadata in `Metadata.Entry.getWrappedMetadataBytes()`, or null if this Entry doesn't contain wrapped metadata.
      Specified by:
        `getWrappedMetadataFormat` in interface `Metadata.Entry`

    - #### getWrappedMetadataBytes

          @Nullable
          public byte[] getWrappedMetadataBytes()

      Description copied from interface: `Metadata.Entry`
      Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata.
      Specified by:
        `getWrappedMetadataBytes` in interface `Metadata.Entry`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals​(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### describeContents

          public int describeContents()

      Specified by:
        `describeContents` in interface `Parcelable`

    - #### writeToParcel

          public void writeToParcel​(Parcel dest,
                                    int flags)

      Specified by:
        `writeToParcel` in interface `Parcelable`