#import @interface ViewController () @property (strong, nonatomic) MPMoviePlayerController *streamPlayer; @end @implementation ViewController @synthesize streamPlayer = _streamPlayer; - (void)viewDidLoad { NSURL *streamURL = [NSURL URLWithString:@"http://www.thumbafon.com/code_examples/video/segment_example/prog_index.m3u8"]; _streamPlayer = [[MPMoviePlayerController alloc] initWithContentURL:streamURL]; [self.streamPlayer.view setFrame: self.view.bounds ]; self.streamPlayer.controlStyle = MPMovieControlStyleEmbedded; [self.view addSubview: self.streamPlayer.view]; [self.streamPlayer play]; } - (void)dealloc { // if non-ARC don't forget! // [_streamPlayer release]; // [super dealloc]; } @end