features/metadata
onChapterMetadata
const onChapterMetadata: NativeUpdatedValue<ChapterMetadata[]>;Subscribes to chapter metadata events.
Param
Called when chapter metadata is received
Returns
Cleanup function to unsubscribe
ChapterMetadata
Chapter metadata with time range. Used for podcast chapters, audiobook chapters, etc.
Properties
| Property | Type | Description |
|---|---|---|
startTime | number | Chapter start time in seconds |
endTime | number | Chapter end time in seconds |
title? | string | Chapter title |
url? | string | URL associated with the chapter |
NowPlayingMetadata
Properties
| Property | Type | Description |
|---|---|---|
title? | string | The track title |
album? | string | The track album |
artist? | string | The track artist |
duration? | number | The track duration in seconds |
artwork? | string | The track artwork |
description? | string | track description |
mediaId? | string | track mediaId |
genre? | string | The track genre |
rating? | Rating | The track rating |
elapsedTime? | number | - |
NowPlayingUpdate
type NowPlayingUpdate = object;Metadata update for the now playing notification. Pass to updateNowPlaying() to override what's shown in the notification/lock screen. Pass null to clear overrides and revert to track metadata.
Properties
title?
optional title: string;Title shown in notification
artist?
optional artist: string;Artist shown in notification
RatingType
type RatingType =
| "heart"
| "thumbs-up-down"
| "three-stars"
| "four-stars"
| "five-stars"
| "percentage"
| "none";onTimedMetadata
const onTimedMetadata: NativeUpdatedValue<TimedMetadata>;Subscribes to timed metadata events (ICY/ID3 from live streams).
Param
Called when stream metadata is received (title, artist from ICY/ID3 tags)
Returns
Cleanup function to unsubscribe
TimedMetadata
Timed metadata received during playback. Contains metadata from ICY streams (radio) or ID3 frames.
Properties
| Property | Type |
|---|---|
title? | string |
artist? | string |
album? | string |
date? | string |
genre? | string |
onTrackMetadata
const onTrackMetadata: NativeUpdatedValue<TrackMetadata>;Subscribes to track metadata events.
Param
Called when static track metadata is received
Returns
Cleanup function to unsubscribe
TrackMetadata
Static track metadata from the media file. Contains standardized metadata fields.
Properties
TrackMetadataBase
Properties
| Property | Type | Description |
|---|---|---|
title? | string | The track title |
album? | string | The track album |
artist? | string | The track artist |
duration? | number | The track duration in seconds |
artwork? | string | The track artwork |
description? | string | track description |
mediaId? | string | track mediaId |
genre? | string | The track genre |
rating? | Rating | The track rating |