Note that there are some explanatory texts on larger screens.

plurals
  1. POPlaying audio from SWF Flash Player in Objective C
    primarykey
    data
    text
    <p>I'm currently making an iOS application where you can search a song. You will then be given a list of songs which you can choose from and then stream from the app. It uses a combination of the tinysong API and I'm attempting to use a URL from Grooveshark combined with the songID given to me to play the song... E.g.</p> <p><a href="https://grooveshark.com/facebookWidget.swf?songID=13963" rel="nofollow noreferrer">https://grooveshark.com/facebookWidget.swf?songID=13963</a> </p> <p>I've already had a quick look at this post: <a href="https://stackoverflow.com/questions/10521264/how-can-i-share-a-grooveshark-music-url-to-facebook-with-the-music-widget">How can i share a grooveshark music url to facebook with the music widget?</a> </p> <p>but I was wondering if I could get more information.</p> <p>What I want to do is play the audio from that link with a changing songID...</p> <p>My Objective C code for this is:</p> <pre><code>//Opens the link of Url from first song and plays it NSString *SongID = [[jsonArray objectAtIndex:0] objectForKey:@"SongID"]; NSString *playString = [@"https://grooveshark.com/facebookWidget.swf?songID=" stringByAppendingString:SongID]; //Converts songURL into a playable NSURL NSURL *playURL = [NSURL URLWithString:playString]; AVAudioPlayer *backgroundMusicPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:playURL error:&amp;error]; [backgroundMusicPlayer prepareToPlay]; [backgroundMusicPlayer play]; </code></pre> <p>But it isn't playing. What should I do to make it play? I know iOS can't play Adobe flash player and considering it is in a swf format, that's why I figured it can't play but I don't know much about flash and/or it in conjunction with iOS. So any help or ideas would be much appreciated.</p> <p>If there is another way to access and play songs from a massive database of songs with their artists and albums too from objective C (like spotify API, but free), please comment as that may be another solution!</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload