samedi 3 janvier 2015

Using StreamingKit with Swift


Vote count:

0




I'm starting a new iOS app using StreamingKit and Swift. I understand the basic principals of initializing Objective-C classes in Swift, but dealing with the STKAudioPlayer class, and translating the library's examples have been a bit rough.


Could one of you be so kind as to help me convert this example into Swift, and show a very basic working audio player?



-(void) audioPlayerViewPlayFromIcecastSelected:(AudioPlayerView *)audioPlayerView
{
NSURL* url = [NSURL URLWithString:@"http://ift.tt/1sPHC8K"];

STKDataSource* dataSource = [STKAudioPlayer dataSourceFromURL:url];

[audioPlayer setDataSource:dataSource withQueueItemId:[[SampleQueueId alloc] initWithUrl:url andCount:0]];
}


asked 1 min ago







Using StreamingKit with Swift

Aucun commentaire:

Enregistrer un commentaire