iOS Question Stream metadata

Erel

B4X founder
Staff member
Licensed User
Longtime User
Try this:
B4X:
Sub GetMetadata(url As String)
   Dim u As NativeObject
   u = u.Initialize("NSURL").RunMethod("URLWithString:", Array(url))
   Dim playerItem As NativeObject
   playerItem = playerItem.Initialize("AVPlayerItem").RunMethod("playerItemWithURL:", Array(u))
   Dim metadataList As List = playerItem.GetField("asset").RunMethod("commonMetadata", Null)
   Log(metadataList)
End Sub
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Just tried on multiple streams (ShoutCast and IceCast) but metadataList is always empty. Maybe only work on mp3 streams.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…