iphone - Get duration of Matt Gallagher's AudioStreamer from http url? -
i'm using matt gallagher's audiostreamer stream mp3 files url. need know stream duration can't find how?!
i tried use duration property of audiostreamer object, returns 0 perhaps because stream url.
help please!
audiostreamer = [[audiostreamer alloc] initwithurl:[nsurl urlwithstring:@"http://ia701509.us.archive.org/25/items/tvquran.com__maher/001.mp3"]]; [audiostreamer start];
after starting stream want duration?
i found great solution using id3 tags , avasset
nsurl *url = [nsurl urlwithstring:@"your url here"]; avasset *asset = [avurlasset urlassetwithurl:url options:nil]; nslog(@"> duration = %.2f seconds", cmtimegetseconds(asset.duration));
Comments
Post a Comment