Metadata
We do not (yet) guess metadata. We read metadata
encoded in the icyx transport layer, in short icy metadata
encoded in the opus codec, called VorbisComments contained in OpusTags
maintained by the ybrid server. The data is taken in parallel to audio stream injection.
AudioPlayerListener.metadataChanged( _ metadata:Metadata )is called by the SDK on appropriate moments. The Metadata interface provides access to the following values.
.displayTitle
.displayTitlecontains a short text describing the currently playing content to be displayed to the user. It's a shortcut of current.displayTitle.
.current
.currentAn item representing the content currently beeing played. Consider this data to be invalid if the player is stopped, because it could be out of date.
.service
.serviceInformation about the service that delivers the items. A service object is always provided and the values are valid until the active service changes (see Ybrid feature swapService).
.next
.nextIf known, the next content. The item, representing the content beeing played after the current content ends.
item metadata
item metadataAccess to an item struct describing the content.
displayTitleanswers the user's question 'What am I listening to?'.
The following fields are optional.
ìdentifiera unique id representing this item. It may become mandatory in future.title,artist,genrecontain the estalished information.album,versionname and version of the collection (see Vorbis Comments).description,infoUriA text, an uri defining a page containing information coming along with the specific content.playbackLengthThe duration of the content in milliseconds. It may be inaccurate and could change during playback.companionsAn array of urls pointing to pictures coming along with the content. Still implementation specific.typeWe currently support the followingItemTypes. It may be extended in future.
public enum ItemType : String {
case ADVERTISEMENT = "ADVERTISEMENT"
case COMEDY = "COMEDY"
case JINGLE = "JINGLE"
case MUSIC = "MUSIC"
case NEWS = "NEWS"
case TRAFFIC = "TRAFFIC"
case VOICE = "VOICE"
case WEATHER = "WEATHER"
case UNKNOWN
}service metadata
service metadataData about source and delivery of audio items. A service is responsible for providing the seqeunce of items.
identifierAn id representing this service is mandatory.displayNameUser information about the source, for example the broadcaster or name of a playlist. It may be an empty string.iconUriUrl to an icon that can represent this service in a gui. For example, the logo of the radio station.genreType of content beeing provided by this service - not equal toitem.genre.description,infoUriA text, a web site uri providing information about the service.
Last updated
Was this helpful?