AI-generated Key Takeaways
-
The
cast.framework.events.Id3Event
class provides data for ID3 metadata events within the Cast framework, delivering information frame by frame. -
This event includes the frame type, description, and data but excludes the raw ID3 message structure like headers and flags.
-
ID3 frame details like
frameType
,frameDescription
, andsegmentData
are accessible via corresponding properties of theId3Event
object. -
Developers can use this event to access and utilize ID3 metadata, such as song titles or artist information, during media playback.
cast.framework.events. Id3Event
Event data for a cast.framework.events.EventType.ID3
event.
The ID3 metadata provided here follows the ID3 v2 formatting.
One event is fired per frame within the ID3 message.
This event does NOT contain the entire, raw ID3 message. Given the following
subsections of an ID3 message:
- ID3v2 / file identifier
- ID3v2 version
- ID3v2 flags
- ID3v2 size
- Frame type (i.e.
TXXX
) - Frame size
- Frame flags
- Frame encoding
- Frame description
- Frame data
Only items 5
(frameType
), 9
(frameDescription
), and 10
(segmentData
) are provided in this event.
Constructor
Id3Event
new Id3Event(segmentData, timestamp, frameDescription, frameType)
Parameter |
|
---|---|
segmentData |
Uint8Array Value must not be null. |
timestamp |
number |
frameDescription |
Optional Uint8Array Value must not be null. |
frameType |
Optional string |
Properties
frameDescription
(non-null Uint8Array or undefined)
The ID3 frame's description.
frameType
(string or undefined)
The ID3 frame tag. A full list of possible tags are listed in https://exiftool.org/TagNames/ID3.html.
segmentData
non-null Uint8Array
The ID3 frame's data.
timestamp
number
The media start time of the ID3 message in seconds.