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 =...
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 =...
I was able to get the metadata but it's very limited. There is no song title or artist in the data. Here is the coding I used at the _TrackChanged sub routine.
B4X:
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
Another issue I found with the ExoPlayer is that it did not detect that the streaming changed the track when they radio station plays a new song. Is there a way to more metadata that contains the song title and artist? Since the ExoPlayer can't detect the track change, I think I will need to set up a timer and call the sub routine every 5 seconds or so even though it will have a slight delay in reporting the information to the user.
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 =...
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 =...
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.
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.
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.
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.
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.