Skip to content

Instantly share code, notes, and snippets.

@runeb
Created April 13, 2012 09:35
Show Gist options
  • Save runeb/2375427 to your computer and use it in GitHub Desktop.
Save runeb/2375427 to your computer and use it in GitHub Desktop.
-(void) playURLString:(NSString*) urlString
{
NSURL *url = [NSURL URLWithString:urlString];
NSDictionary *movieAttrs = [NSDictionary dictionaryWithObjectsAndKeys:
url,
QTMovieURLAttribute,
[NSNumber numberWithBool:YES],
QTMovieOpenForPlaybackAttribute,
nil];
if(radio) {
[radio stop];
[radio release];
}
radio = [[QTMovie alloc] initWithAttributes:movieAttrs error:nil];
[radio autoplay];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment