StreamingKit
StreamingKit copied to clipboard
How to get the http audio stream metadata
I'm currently using AVPlayerItem to stream my audio source. I would like to use audjustable but I need to be able to get my songs title.
Currently I'm using KVO on avplayeritem.timedMetadata.
How can I get the audio stream metadata in audjustable
By the way, thank for the great work !
+1 need this too. So much!
code snippet mentioned by @Tommecpe which is useful to read metadata with AVPlayer may look like this
AVPlayerItem* playerItem = [AVPlayerItem playerItemWithURL:streamUrl];
[playerItem addObserver:self forKeyPath:@"timedMetadata" options:NSKeyValueObservingOptionNew context:nil];
AVPlayer* player = [AVPlayer playerWithPlayerItem:playerItem] ;
[player play];
- (void) observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object
change:(NSDictionary*)change context:(void*)context {
if ([keyPath isEqualToString:@"timedMetadata"])
{
AVPlayerItem* playerItem = object;
for (AVMetadataItem* metadata in playerItem.timedMetadata)
{
NSLog(@"\nkey: %@\nkeySpace: %@\ncommonKey: %@\nvalue: %@", [metadata.key description], metadata.keySpace, metadata.commonKey, metadata.stringValue);
}
}
}
is there something like this in audjustable AudioPlayer or HttpDataSource? My best option is to be notified via delegate.
What type of metadata are you trying to get? Track name...ID3 tags etc?
Yes, track name is most needed.
02 ôåâð. 2014 ã., â 23:54, Thong Nguyen [email protected] íàïèñàë(à):
What type of metadata are you trying to get? Track name...ID3 tags etc?
— Reply to this email directly or view it on GitHub.
@tumtumtum could you please comment on this.
It's not supported at the moment. Pull requests are welcome.
+1 need this too. It will be awesome to use it with metadata.
Any update on ID3 MetaData?