Since switching from Mediaplayer to a simple implementation Exoplayer I have noticed much improved load times but I\'m wondering if there is any built in functionality such
Icy metadata support is now in exoplayer version 2.10:
ExoPlayerFactory.newSimpleInstance(this).apply {
setAudioAttributes(
AudioAttributes.Builder()
.setContentType(C.CONTENT_TYPE_MUSIC)
.setUsage(C.USAGE_MEDIA)
.build(), true
)
addMetadataOutput(object : MetadataOutput {
override fun onMetadata(metadata: Metadata) {
for (n in 0 until metadata.length()) {
when (val md = metadata[n]) {
is com.google.android.exoplayer2.metadata.icy.IcyInfo -> {
Log.d(TAG, "Title: ${md.title} URL: ${md.url}")
}
else -> {
Log.d(TAG, "Some other sort of metadata: $md")
}
}
}
}
})
}