mpmovieplayercontroller

Getting SIGABRT signal when I try to play a video (Objective-C)

♀尐吖头ヾ 提交于 2019-12-12 02:30:04
问题 When I try to load a video, I'm getting a SIGABRT thrown. Below is my code. If anybody could let me know why I'm getting this error, that would be great. The signal is being thrown for the line: theMovie = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url]]; Two questions: what is wrong with my code? and what does SIGABRT usually mean? #import "Video.h" #import "MyManager.h" #import @implementation Video MPMoviePlayerController* theMovie; - (id)initWithNibName:

Use accelerometer in my movieplayer app

删除回忆录丶 提交于 2019-12-12 02:27:34
问题 I had an app which plays videos from a web server but it just plays in landscape orientation. I want my app to use the accelerometer to play my videos both in landscape and in portrait orientation. I want my video playback feature to look like the youtube app in the iPhone. Can anyone please help me how to do this? thanks 回答1: For this you do not need the accelerometer. Instead you listen to the notifications from the UIDevice singleton instance that are sent when the orientation changes. In

MPMoviePlayer loading the video but never enters readyToPlay state

◇◆丶佛笑我妖孽 提交于 2019-12-12 01:33:42
问题 I have been trying to get a video to play using MPMoviePlayerController for about a week with very little success! I have finally got it to the stage where it loads the video (or at least I presume it does as it can tell me the video duration). However, my video never becomes playable therefore I am just presented with a black square. My code is as follows: - (void)loadMovieWithURL:(NSURL *)movieURL { NSLog( @"Video URL = '%@'", [movieURL path]); NSData *data = [NSData dataWithContentsOfURL

How to make only MPMoviePlayerController in both landscape and portrait mode

↘锁芯ラ 提交于 2019-12-12 01:08:41
问题 I am working on a application which has to play videos when clicking on some thumbnail, I am displaying list. I want only the Video to rotate in Landscape and Portrait Mode but other screens must in Portrait Mode How can we do this. 回答1: In ViewWillAppear UIViewController *vc = [[UIViewController alloc] init]; [self presentViewController:vc animated:NO completion:NULL]; [self dismissViewControllerAnimated:NO completion:NULL]; This will trigger the redrawing of the view and thus calling

MPMoviePlayerController and the NSURL object

删除回忆录丶 提交于 2019-12-11 18:13:02
问题 The NSURL object returned by pathForResource is null for custom imported movie files. -(NSURL *)localMovieURL { NSURL *theMovieURL = nil; NSBundle *bundle = [NSBundle mainBundle]; if (bundle) { NSString *moviePath = [bundle pathForResource:@"Movie" ofType:@"m4v"]; //NSString *moviePath = [bundle pathForResource:@"Movie_01" ofType:@"m4v"]; //NSString *moviePath = [bundle pathForResource:@"Sample" ofType:@"m4v"]; if (moviePath) { theMovieURL = [NSURL fileURLWithPath:moviePath]; } NSLog(@" MMM

Playing a video with MPMoviePlayerController in Portrait WITHOUT Private API - Will I get rejected by Apple?

佐手、 提交于 2019-12-11 15:46:05
问题 It's my understanding that MPMoviePlayerController movies must play in landscape orientation because the "setOrientation:" function is private API. Well, it occurred to me that if I were to rotate the video 90 degrees in Final Cut and then re-render, the video would APPEAR to be playing in portrait orientation even though it was technically playing in landscape. I would simply have to disable the play controls to complete the effect (which is okay). Could I my app still face rejection if I

iphone: Preserve view on top of mpMoviePlayerController

喜你入骨 提交于 2019-12-11 13:51:49
问题 I have a mpMoviePlayerController, and I have subview on top of it. When the user taps the fullscreen button of the mpMoviePlayerController, the subview disappears, and only appears when I go back to the original size. Is there a way to keep the subview? Is there a way to get a reference of the "scaled" moviePlayer? 回答1: Quick Draft: trap MPMoviePlayerWillEnterFullscreenNotification like this: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector

AVPlayerViewController with custom overlay

江枫思渺然 提交于 2019-12-11 13:22:39
问题 Migrating to AVkit from MPMoviePlayer has brought me to a blocking issue. I need to display a custom tableView over the AVPlayerViewController. I can this tableview trough [self.avVideoPlayer.contentOverlayView addsubiew:self.mycustomTableView] and it is visible but it doesn't receive any tap/swipe events. Any ideas why this happens or how can I add the table view in a place where it would receive the touch events even in the fullscreen mode? 回答1: [self.view addSubview:btn]; This will add the

Customizable non-full screen video player in iPhone

[亡魂溺海] 提交于 2019-12-11 12:38:29
问题 I know that there is an MPMoviePlayerController present in iPhone to play movies from. But it isn't customizable in the real sense. Also, if I wanted to play movies is a non-full screen mode, it isn't possible today. I wanted to inquire if anyone knows about the future roadmap of iPhone SDK, is there going to be any such customizable video player upcoming? Also, is it possible to write a new video player from scratch (maybe including the codecs), then in that case which part of the SDK should

MPMoviePlayerController in full screen issue (showing blank black screen)

杀马特。学长 韩版系。学妹 提交于 2019-12-11 09:26:59
问题 I have tabBarViewController which contain few pages, and a loginViewController. I use [window addSubView:] to add the views. When I need to play fullcreen video, I have to remove all the view in window in order to displaying the video, else, it is just a black screen. When the video is stop/finished/exitFrom full screen, I have to manually add the subview back again to window. I know this is a wrong way of doing it. If I'm not doing this way, when video is switched to full screen, it will