mpmovieplayer

How to play m3u audio stream in iOS app

十年热恋 提交于 2019-11-28 05:14:30
问题 I'm trying to create an iOS/iPhone radio app using Xcode 4.5.2. I wanted to stream @"http://xx.xxxxxxx.com/8111/radio.m3u" with play, pause, volume control and able to play on background feature/multitasking. I've added AVFoundation , Mediaplayer and AudioToolBox frameworks thus far. I've added play, pause and slider objects to xib. ViewController.h @interface ViewController : UIViewController @property (strong,nonatomic) MPMoviePlayerController *myPlayer; @property (weak, nonatomic) IBOutlet

Putting a video to pause state before playing

风格不统一 提交于 2019-11-27 19:05:45
问题 I am using MVMoviePlayer to play videos in the app. Right now, a black screen comes after taping the play button and the video starts playing. But, the black screen is casing some discofort from the user end point of view. So, i want to start the video from a paused state. In order to do this, i thought of putting the player to paused state before playing it.. Is there a way to do this??? 回答1: You can hide your MPMoviePlayer until that annoying black flicker is gone. To ensure that the black

iPhone SDK:How do you play video inside a view? Rather than fullscreen

試著忘記壹切 提交于 2019-11-27 06:02:14
I am trying to play video inside a UIView , so my first step was to add a class for that view and start playing a movie in it using this code: - (IBAction)movie:(id)sender{ NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@"Movie" ofType:@"m4v"]; NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain]; MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; theMovie.scalingMode = MPMovieScalingModeAspectFill; [theMovie play]; } But this just crashes the app when using this method inside it's own class, but

Using MPMoviePlayerViewController in SDK 3.2 for iPad

本小妞迷上赌 提交于 2019-11-27 04:17:48
I've developed an iPhone app that has been running MPMoviePlayer (pre 3.2 SDK) with no problems. I know this is a newbie question, but how do I get a movie to play in the new MPMoviePlayerViewController. I am only getting audio and wish to learn the new view controller. I've ported my whole app over to iPad and everything else works fine except for video. Could someone please show an example using the movie view controller? Any help would be appreciated. Thanks, Aneesh NSURL* videoURL = [NSURL URLWithString:url]; MPMoviePlayerController moviePlayer = [[MPMoviePlayerController alloc]

Using MPMoviePlayerViewController in SDK 3.2 for iPad

北战南征 提交于 2019-11-26 12:43:53
问题 I\'ve developed an iPhone app that has been running MPMoviePlayer (pre 3.2 SDK) with no problems. I know this is a newbie question, but how do I get a movie to play in the new MPMoviePlayerViewController. I am only getting audio and wish to learn the new view controller. I\'ve ported my whole app over to iPad and everything else works fine except for video. Could someone please show an example using the movie view controller? Any help would be appreciated. Thanks, 回答1: NSURL* videoURL =

iPhone SDK:How do you play video inside a view? Rather than fullscreen

最后都变了- 提交于 2019-11-26 11:49:56
问题 I am trying to play video inside a UIView , so my first step was to add a class for that view and start playing a movie in it using this code: - (IBAction)movie:(id)sender{ NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@\"Movie\" ofType:@\"m4v\"]; NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain]; MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; theMovie.scalingMode =

How to receive NSNotifications from UIWebView embedded YouTube video playback

限于喜欢 提交于 2019-11-26 02:16:58
问题 I didn\'t received any notifications for MPMoviePlayerController . What am I doing wrong? I use following logic. I\'m begining to play youtube video in UIWebView . UIWebView calls a standard MPMoviePlayerController . I don\'t control MPMoviePlayerController because I didn\'t instantiate MPMoviePlayerController . I run youtube\'s clip with autoplay (1 second delay): [self performSelector:@selector(touchInView:) withObject:b afterDelay:1]; My code is: - (void)viewDidLoad { [super viewDidLoad];