Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)playStationStream {
- EGStream *stream = _station.streams[0];
- NSURL *videoURL = [[NSURL alloc] initWithString:stream.url];
- VideoStreamObject *videoStreamObject = [[VideoStreamObject alloc] initWithStreamURL:videoURL.absoluteString];
- if(!(videoStreamObject == nil)){
- [videoStreamObject prepareStream:^(BOOL success, NSURL *url) {
- dispatch_async(dispatch_get_main_queue(), ^{
- [_moviePlayerViewController.moviePlayer stop];
- _moviePlayerViewController.moviePlayer.contentURL = url;
- _moviePlayerViewController.moviePlayer.movieSourceType = MPMovieSourceTypeStreaming;
- [_moviePlayerViewController.moviePlayer prepareToPlay];
- [_moviePlayerViewController.moviePlayer play];
- });
- }];}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement