Tag: mpmovieplayercontroller

使用MPMoviePlayerViewController时髦的错误

有谁知道这些错误是什么意思? 当我点击一个button来播放video时,我可以得到这个信息(通过networking按需下载)。 我遇到的问题是我的video没有audio播放。 实际上audio音量栏在加载时完全消失。 我觉得这跟这个错误有关。 ~~>>SponViewController :sponButton: 2011-10-26 12:52:04.212 myapp[2692:12e03] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn: dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2011-10-26 12:52:04.222 myapp[2692:12e03] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn: dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: ___CFObjCIsCollectable Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2011-10-26 12:52:04.258 myapp[2692:12e03] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): […]

MPMoviePlayerViewController | 允许横向模式

我正在尝试在我的应用程序中传输video。 我发现的方法是: NSURL *theMovieURL = [NSURL URLWithString:self.data.trailer]; if (theMovieURL) { self.movieController = [[MPMoviePlayerViewController alloc] initWithContentURL:theMovieURL]; [self presentMoviePlayerViewControllerAnimated:self.movieController]; [self.movieController.moviePlayer play]; } 我不确定这是否是最传统的,但是它是有效的。 问题是,我不知道如何只允许video的横向模式。 我应该使用像shouldAutorotate或shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation ,以及如何? 仅供参考,整个应用程序只允许肖像模式。 谢谢你的帮助。

iOS将MPMoviePlayerController镜像到全屏电视屏幕播放

我有一个使用MPMoviePlayerController播放video(本地存储)的应用程序 NSString *deviceDir = [[NSUserDefaults standardUserDefaults] stringForKey:WZLDEVICEPATH]; NSString *videopath = [deviceDir stringByAppendingPathComponent:video] NSURL *url = [NSURL fileURLWithPath:videopath]; player = [[MPMoviePlayerController alloc] initWithContentURL:url]; CGRect viewInsetRect = CGRectInset (playerframe, 0.0, 0.0 ); /* Inset the movie frame in the parent view frame. */ [[player view] setFrame:viewInsetRect]; [player view].backgroundColor = [UIColor clearColor]; [player view].tag = TAG_VIDEO_PLAYER; player.movieSourceType = […]

MPMoviePlayerController不能从Documents文件夹中播放

Desperated。 大家好! 我有一些与MPMoviePlayerController问题。 我已经使用NSBundle的video。 但那不是我所需要的。 我需要从Documents目录播放它,因为那是我存储录制video的地方,这些URL存储在CoreData中。 但是让我们把它放在一边,简化代码到最小的需要。 这个代码实际上是工作如果使用contentURL,导致NSBundle。 之后,我做了什么去文档的地方。 我做的事: NSURL *contentURL = [[NSBundle mainBundle] URLForResource:@"Oct_08_2012_10_00_51" withExtension:@"mp4"]; // this works NSString* docPath = [NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSString * docaPathFull = [NSString stringWithFormat:@"%@%@", docPath, @"/Oct_08_2012_10_00_51.mp4"]; NSURL * docUrl= [NSURL URLWithString: docaPathFull]; BOOL ex = [[NSFileManager defaultManager] fileExistsAtPath:docaPathFull]; NSLog(@"file exists: %d, path using docPath: %@",ex, […]

MPMoviePlayerControlleraudio显示“完成”button

我使用MPMoviePlayerController播放audiostream。 我的代码如下所示: Getting MPMoviePlayerController to Work with iOS4, 3.2 (iPad) and Earlier Versions of iPhone SDK 一切正常,但stream播放时没有“完成”button来closures播放器。 我先用普通的.mp3文件testing一下。 有了这个文件,我发现的唯一可能性就是跳到最后,所以播放器获取MPMoviePlayerPlaybackDidFinishNotification通知(但是由于没有时间线可以跳到最后,所以不能在无尽的stream中工作)。 我尝试过不同的样式,如[mp setControlStyle:MPMovieControlStyleFullscreen]; 没有成功。 在MPMoviePlayerController类的文档中包括 : 这个类可以播放iOS中支持的任何电影或audio文件。 这包括stream式内容和固定长度文件 在播放某些audio内容时是否可以显示该button,或者是否有其他解决scheme? 我试图给你看一个截图,但“新用户只能发布最多两个超链接”。

MPMoviePlayerController几秒钟后停止播放

几秒钟后, MPMoviePlayerController停止播放,这是我正在使用的代码: NSString *urlAddress = @"http://67.159.28.74:8730"; NSURL *url = [NSURL URLWithString:urlAddress]; MPMoviePlayerController *player = [[MPMoviePlayerController alloc]initWithContentURL:url]; player.movieSourceType = MPMovieSourceTypeStreaming; player.view.hidden = NO; [self.view addSubview:player.view]; [player prepareToPlay]; if(player){ [player play]; } 进入控制台的错误是: 2012-09-23 18:07:56.618 Reader[696:c07] [MPAVController] Autoplay: Disabling autoplay for pause 2012-09-23 18:07:56.619 Reader[696:c07] [MPAVController] Autoplay: Disabling autoplay 2012-09-23 18:07:56.638 Reader[696:c07] [MPAVController] Autoplay: Disabling autoplay for […]

找出MPMoviePlayerController是否正在播放

我有关于MPMoviePlayerController的一个小问题,我有一个链接,播放电影,当我点击该电影button,但是当我点击另一个button应用程序崩溃,我需要find如何确定电影播放或获得任何forms的回应

itemFailedToPlayToEnd – MPMoviePlayerController – iOS7

遇到一个奇怪的问题,而更新我的应用程序的iOS 7 。 对于iOS 6 ,没有问题,video总是被加载。 但是,这不是这种情况。 我有一个显示playlistItems的scrollview – 一旦你点击playlistItem ,一个MPMoviePlayerController创build显示播放列表项目(video)。 以下是我相信造成问题的方法: – (void) play:(NSInteger)itemId withAutostart:(BOOL)autostart { // remember whether it is in fullscreen or not to restore for the next playlist item self.playerInFullscreen = self.player.isFullscreen; if (player != nil) { [self.player setFullscreen:NO animated:NO]; [self stopListeningPlaybackFinishedEvents]; [player stop]; [self startListeningPlaybackFinishedEvents]; } PlaylistItem * pi = […]

iOS – video不能仅在iOS7上通过iPhone旋转?

我做了什么? 我正在MPMoviePlayerViewController的扩展类中播放video,并已经实现了如下的方向function – (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { if (toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown){ return FALSE; } else{ return TRUE; } } – (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { [self setControlsPositions:toInterfaceOrientation]; } -(BOOL)shouldAutorotate { return YES; } 我面临什么问题? 应用程序工作正常,直到iPhone6上的iOS6 Almong与iPad(与iOS7),但video不会旋转通过安装iOS7的iPhone。 这个问题的原因是什么?如何解决? 更新 我发现,如果setMovieSourceType设置为MPMovieSourceTypeUnknown ,则video会旋转,但设置为“MPMovieSourceTypeStreaming”时不会旋转

在iOS7上播放videostream

我试图在iOS上播放一个简单的直播链接。 有一个视图控制器的button与戏剧行动定义如下。 – (IBAction)play:(id)sender { NSString *path = @"http://asish.flashmediacast.com:2135/live/International/playlist.m3u8"; MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:path]]; [mp.view setFrame:[self.view bounds]]; [mp prepareToPlay]; [mp play]; } 那么按下button什么都没有发生。 我检查了链接,它工作正常。 我哪里错了? 我find了一个解决scheme,告诉你创build一个MPMovieViewCOntroller MPMoviePlayerViewController *mpvc = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlaybackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil]; mpvc.moviePlayer.movieSourceType = MPMovieSourceTypeStreaming; [self presentMoviePlayerViewControllerAnimated:mpvc]; [mpvc release]; 问题是我怎样称之为ViewCOntroller?