Thanks for the reply. Do you have a coding sample to share that shows the use of okhttputils to collect the details?Your server should be able to provide you those details. YOu just need to use okhttputils to download them and display
I'm actually doing the search now but didn't find anything yet. Still searching but will try that coding in the link you sent first.Did you use search?
ExoPlayer-ID3 metadata how to get data
Hi This is a continuation of this thread: https://www.b4x.com/android/forum/threads/exoplayer-id3-metadata.112430/ This is the code that Erel put: Sub Player_TrackChanged Dim jo As JavaObject = player1 Dim TrackGroups As JavaObject =...www.b4x.com
Unfortunately that's above my head.Metadata.Entry (ExoPlayer library)
exoplayer.dev
Sub player_TrackChanged
Log ("The track changed.")
Dim jo As JavaObject = player1
Dim TrackGroups As JavaObject = jo.GetFieldJO("player").RunMethod("getCurrentTrackGroups", Null)
For i = 0 To TrackGroups.GetField("length") - 1
Dim TrackGroup As JavaObject = TrackGroups.RunMethod("get", Array(i))
For j = 0 To TrackGroup.GetField("length") - 1
Dim Format As JavaObject = TrackGroup.RunMethodJO("getFormat", Array(j))
Dim Metadata As JavaObject = Format.GetField("metadata")
If Metadata.IsInitialized Then
Log("Found: " & Metadata)
End If
Next
Next
End Sub
Found: (Metadata) entries=[IcyHeaders: name="VIFM", genre="Easy Listening", bitrate=320000, metadataInterval=16000]
Thanks for the script. After a lot of searching, I found that the server my customer is using has an API that will return JSON showing all of that good stuff. I will search for examples on calling the API and extracting JSON in the forum so I will mark this post as solved.I created a php script to retrieve the meta data
ExoPlayer-ID3 metadata how to get data
Hi This is a continuation of this thread: https://www.b4x.com/android/forum/threads/exoplayer-id3-metadata.112430/ This is the code that Erel put: Sub Player_TrackChanged Dim jo As JavaObject = player1 Dim TrackGroups As JavaObject =...www.b4x.com
Thanks for the script. After a lot of searching, I found that the server my customer is using has an API that will return JSON showing all of that good stuff. I will search for examples on calling the API and extracting JSON in the forum so I will mark this post as solved.
The radio station server software is from: Here
The API documentation is: Here
Sure. No problem. I will after I get it working.Can you add a sample project ..It will be very useful.
You can do this for one station or group of the same broadcaster. However, if you want to play several thousand streams, this method doesn't make sense. Each sender uses its own solutions and it requires separate treatment.Here's a project that has coding to extract the song title and artist's name from the current song playing based on the graph provided by This tool.
Link to the project.
View attachment 102005
It's for only one station who hired me that's located in Malaysia for the visually impaired community. It will be a free no-advert app that will be on the Play Store.You can do this for one station or group of the same broadcaster. However, if you want to play several thousand streams, this method doesn't make sense. Each sender uses its own solutions and it requires separate treatment.
player?.addListener(object : Player.Listener {
override fun onMediaMetadataChanged(mediaMetadata: MediaMetadata) {
super.onMediaMetadataChanged(mediaMetadata)
mediaMetadata.title?.let { title ->
songTitle = title.toString()
}
}
}