# Id3Peeker

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/Id3Peeker.java+class:androidx.media3.extractor.Id3Peeker)

*** ** * ** ***


```
@UnstableApi
class Id3Peeker
```

<br />

*** ** * ** ***

Peeks data from the beginning of an `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput` to determine if there is any ID3 tag.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Id3Peeker#Id3Peeker()()` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata?` | `@https://checkerframework.org/api/com/google/errorprone/annotations/InlineMe.html(replacement = "this.peekId3Data(input, id3FramePredicate, /* maxTagPeekBytes= */ 0)") [peekId3Data](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Id3Peeker#peekId3Data(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.metadata.id3.Id3Decoder.FramePredicate))( input: https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput!, id3FramePredicate: https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/Id3Decoder.FramePredicate? )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Id3Peeker#peekId3Data(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.metadata.id3.Id3Decoder.FramePredicate,int)` instead. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata?` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Id3Peeker#peekId3Data(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.metadata.id3.Id3Decoder.FramePredicate,int)( input: https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput!, id3FramePredicate: https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/Id3Decoder.FramePredicate?, maxTagPeekBytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Peeks ID3 data from the input and parses the first ID3 tag. |

## Public constructors

### Id3Peeker

```
Id3Peeker()
```

## Public functions

### peekId3Data

```
@InlineMe(replacement = "this.peekId3Data(input, id3FramePredicate, /* maxTagPeekBytes= */ 0)")
fun [peekId3Data](https://developer.android.com/reference/kotlin/androidx/media3/extractor/Id3Peeker#peekId3Data(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.metadata.id3.Id3Decoder.FramePredicate))(
    input: ExtractorInput!,
    id3FramePredicate: Id3Decoder.FramePredicate?
): Metadata?
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/extractor/Id3Peeker#peekId3Data(androidx.media3.extractor.ExtractorInput,androidx.media3.extractor.metadata.id3.Id3Decoder.FramePredicate,int)` instead.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` |   |

### peekId3Data

```
fun peekId3Data(
    input: ExtractorInput!,
    id3FramePredicate: Id3Decoder.FramePredicate?,
    maxTagPeekBytes: Int
): Metadata?
```

Peeks ID3 data from the input and parses the first ID3 tag.

| Parameters |
|---|---|
| `input: https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput!` | The `https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorInput` from which data should be peeked. |
| `id3FramePredicate: https://developer.android.com/reference/kotlin/androidx/media3/extractor/metadata/id3/Id3Decoder.FramePredicate?` | Determines which ID3 frames are decoded. May be null to decode all frames. |
| `maxTagPeekBytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The maximum number of bytes to peek when searching for each ID3 tag before giving up. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata?` | The first ID3 tag decoded into a `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata` object. May be null if ID3 tag is not present in the input. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` | If an error occurred peeking from the input. |