mpmovieplayercontroller

MPMoviePlayerController alternatives on iPhone?

落花浮王杯 提交于 2019-12-31 10:36:16
问题 I am looking for alternatives to the MPMoviePlayerController on the iPhone. As a video player its functionality is very limited. According to the class reference there is no way to get the current play back time or set a new time, for example. It's just play and stop. Are there any middleware solutions out there for iPhone video playback that offer more functionality? CRI has something in development but it has not been released. I haven't been able to find anything else. Thanks. 回答1: Keep in

iOS6 and MPMoviePlayerController - Black View

一个人想着一个人 提交于 2019-12-30 11:51:09
问题 I have a MPMoviePlayerController that plays a video embedded within a View. This worked perfectly on iOS5/5.1 etc... but since upgrading to iOS6 this has stopped working and now the view is just black. Does anyone have any ideas or similar issues? Thanks 回答1: Try this one...... NSString *resourcePath = [[NSBundle mainBundle] pathForResource:@"ddd" ofType:@"mp4"]; NSURL *url = [NSURL fileURLWithPath:resourcePath]; MPMoviePlayerViewController *moviePlayer = [[MPMoviePlayerViewController alloc]

Localize Done button of MPMoviePlayerViewController

不问归期 提交于 2019-12-30 09:29:14
问题 I am using a MPMoviePlayerViewController to present videos. Everything works as expected, but if I switch the device's language to e.g. German, the "Done" button is not localized. I tried to access the button and set it to my own button implementation like so: MPMoviePlayerViewController *mp = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; NSLog(@"%@", mp.navigationItem.leftBarButtonItem); // always null, but why? // override button with locale mp.navigationItem

MPMoviePlayerControlle thumbnailImageAtTime: timeOption: giving empty UIImage

我们两清 提交于 2019-12-30 07:14:07
问题 Im using this to get a Preview thumbnail of a Video: - (void)createThumb { NSInteger paddingLeft = 22; NSInteger paddingTop = 22; CGFloat frameWidth = self.preview.frame.size.width - (2 * paddingLeft); CGFloat frameHeight = self.preview.frame.size.height - (2 * paddingTop); CGSize size = CGSizeMake(frameWidth, frameHeight); MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:self.fileUrl]; NSLog(@"File url %@",self.fileUrl); UIImage *thumbnail = [mp

Fill master and detail view in full screen mode of iPad

好久不见. 提交于 2019-12-30 01:38:13
问题 I am using Master-Detail Application template, in my iPad application. I have master-view that contains list of videos. When selecting any list item, it starts playing video of that item on the detail-view. I am using MPMoviePlayerController to play the videos. If I press full screen icon, the player should fill the entire screen (master-view as well as detail-view, not just detail-view). How could I do this? Please help! 回答1: you can Hide or show MasterViewcontroller By using Delegate of

Why won't my MPMoviePlayerController play?

╄→гoц情女王★ 提交于 2019-12-29 07:49:11
问题 I'm trying to get a basic .mov video file to play using the code below, but when the button I have assigned the action is pressed, the only thing that shows up is the black frame, but no video is played. Any help is appreciated. Thanks. @implementation SRViewController -(IBAction)playMovie{ NSString *url = [[NSBundle mainBundle] pathForResource:@"OntheTitle" ofType:@"mov"]; MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL: [NSURL fileURLWithPath:url]]; //

Why won't my MPMoviePlayerController play?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-29 07:49:08
问题 I'm trying to get a basic .mov video file to play using the code below, but when the button I have assigned the action is pressed, the only thing that shows up is the black frame, but no video is played. Any help is appreciated. Thanks. @implementation SRViewController -(IBAction)playMovie{ NSString *url = [[NSBundle mainBundle] pathForResource:@"OntheTitle" ofType:@"mov"]; MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL: [NSURL fileURLWithPath:url]]; //

How to split Code for iOS 3.0 and iOS 3.2 so I can use MPMoviePlayerViewController if OS 3.2++

不打扰是莪最后的温柔 提交于 2019-12-29 06:31:35
问题 I have a video that I play. To use full screen in iOS 3.2 I use the MPMoviePlayerViewController (seems to only work with that Class). But if I want to build for iOS 3.0 I obviously get several errors, because this class is not known in iOS 3.0. I also know how to get what I want with MPMoviePlayerController in iOS 3.0, but I can only have one, either the code for iOS 3.0 or the code for iOS 3.2. How to cope with that ? - Solution found (see bottom of bundled edit) I guess I have to use

Subtitles for AVPlayer/MPMoviePlayerController

三世轮回 提交于 2019-12-29 02:52:47
问题 I am using m3u8 video format for streaming the video and now I need to display subtitles for the same. I searched in Apple Documentation and found that I can achieve this by using the closedCaptionDisplayEnabled property of AVPlayer . I am interested to know what should be the format of subtitles? Will the .srt format do? Also can I achieve the same using MPMoviePlayerController ? Any help is appreciated. 回答1: Update 10/30/2018: It's worth checking this answer by an Apple engineer (Thanks to

How to get an error description when playback fails on MPMoviePlayerController

左心房为你撑大大i 提交于 2019-12-28 15:21:08
问题 I want to show an UIAlert if the Video-Play fails. So i registered the MPMoviePlayerPlaybackDidFinishNotification for my Movie Player: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myMovieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:self.moviePlayer]; In my myMovieFinishedCallback: I check if in the User Info Dictionary is a Object named error . On my real device I don't get this error (on no network error, 404 error for file). On the