# EventMessage

Artifact: [androidx.media3:media3-extractor](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/extractor/metadata/emsg/EventMessage.java+class:androidx.media3.extractor.metadata.emsg.EventMessage)

*** ** * ** ***

<br />

```
@UnstableApi
class EventMessage : Metadata.Entry
```

<br />

*** ** * ** ***

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

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/annotation/VisibleForTesting https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/emsg/EventMessage#ID3_SCHEME_ID_AOM() = "https://aomedia.org/emsg/ID3"` emsg scheme_id_uri from the [CMAF spec](https://aomediacodec.github.io/av1-id3/#semantics). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/annotation/VisibleForTesting https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/emsg/EventMessage#SCTE35_SCHEME_ID() = "urn:scte:scte35:2014:bin"` scheme_id_uri from section 7.3.2 of [SCTE 214-3 2015](https://www.scte.org/SCTEDocs/Standards/ANSI_SCTE%20214-3%202015.pdf). |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/emsg/EventMessage#EventMessage(java.lang.String,java.lang.String,long,long,byte[])( schemeIdUri: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, durationMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, messageData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>! )` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/emsg/EventMessage#equals(java.lang.Object)(obj: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>?` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/emsg/EventMessage#getWrappedMetadataBytes()()` Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/Format?` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/emsg/EventMessage#getWrappedMetadataFormat()()` Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` that can be used to decode the wrapped metadata in `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry#getWrappedMetadataBytes()`, or null if this Entry doesn't contain wrapped metadata. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/emsg/EventMessage#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/emsg/EventMessage#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/emsg/EventMessage#durationMs()` The duration of the event in milliseconds. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/emsg/EventMessage#id()` The instance identifier. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/emsg/EventMessage#messageData()` The body of the message. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/emsg/EventMessage#schemeIdUri()` The message scheme. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/emsg/EventMessage#value()` The value for the event. |

### Inherited functions

From [androidx.media3.common.Metadata.Entry](https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry#populateMediaMetadata(androidx.media3.common.MediaMetadata.Builder)(builder: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata.Builder!)`

Updates the `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata.Builder` with the type-specific values stored in this ` Entry`.

## Constants

### ID3_SCHEME_ID_AOM

```
@VisibleForTesting
const val ID3_SCHEME_ID_AOM = "https://aomedia.org/emsg/ID3": String!
```

emsg scheme_id_uri from the [CMAF spec](https://aomediacodec.github.io/av1-id3/#semantics).

### SCTE35_SCHEME_ID

```
@VisibleForTesting
const val SCTE35_SCHEME_ID = "urn:scte:scte35:2014:bin": String!
```

scheme_id_uri from section 7.3.2 of [SCTE 214-3 2015](https://www.scte.org/SCTEDocs/Standards/ANSI_SCTE%20214-3%202015.pdf).

## Public constructors

### EventMessage

```
EventMessage(
    schemeIdUri: String!,
    value: String!,
    durationMs: Long,
    id: Long,
    messageData: ByteArray<Byte>!
)
```

| Parameters |
|---|---|
| `schemeIdUri: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The message scheme. |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The value for the event. |
| `durationMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The duration of the event in milliseconds. |
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The instance identifier. |
| `messageData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | The body of the message. |

## Public functions

### equals

```
fun equals(obj: Any?): Boolean
```

### getWrappedMetadataBytes

```
fun getWrappedMetadataBytes(): Array<Byte>?
```

Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata.

### getWrappedMetadataFormat

```
fun getWrappedMetadataFormat(): Format?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` that can be used to decode the wrapped metadata in `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata.Entry#getWrappedMetadataBytes()`, or null if this Entry doesn't contain wrapped metadata.

### hashCode

```
fun hashCode(): Int
```

### toString

```
fun toString(): String!
```

## Public properties

### durationMs

```
val durationMs: Long
```

The duration of the event in milliseconds.

### id

```
val id: Long
```

The instance identifier.

### messageData

```
val messageData: Array<Byte>!
```

The body of the message.

### schemeIdUri

```
val schemeIdUri: String!
```

The message scheme.

### value

```
val value: String!
```

The value for the event.