I'm asking here because I got no answer on stackOverflow and I really want this to work.
I have a URL for Shoutcast audio stream. I used AVFoundation. AVAsset to enclose URL and AVPlayer to play it. That works.
I cannot however access any metadata from that stream.
I tried:
I have a URL for Shoutcast audio stream. I used AVFoundation. AVAsset to enclose URL and AVPlayer to play it. That works.
I cannot however access any metadata from that stream.
I tried:
Code Block swift playerItem!.observe(\AVPlayerItem.timedMetadata, options: .new) { (player, change) in print(change) }
got nothingapple tutorial and got empty availableMetadataFormats.
AVPlayerItem.timedMetadata (deprecated) or AVPlayerItemMetadataOutput should return valid metadata if it is available in the Shoutcast stream. Please note that prior to iOS 14, you would only get StreamTitle and StreamUrl metadata, we recently added support for more icy-metadata. If you are not seeing metadata present in the stream, please file a report through Feedback Assistant.
For Shoutcast streams AVAsset.availableMediaFormats won't work, since they can be used only for statically available metadata.
For Shoutcast streams AVAsset.availableMediaFormats won't work, since they can be used only for statically available metadata.