mpmovieplayercontroller

iOS 6.0 MPMoviePlayerController full screen mode black color? then App blocked no more actions

孤街浪徒 提交于 2020-01-15 03:26:08
问题 MPMoviePlayerController video goes to full screen mode at the time screen is black color. And then the app was blocked. This issue only for iOS 6.0. But iOS 5.1 working fine. This is my code. IF I double click the player full screen is opened, But show black screen. self.moviePlayerController = [[MPMoviePlayerController alloc] init]; [self.moviePlayerController.view setFrame:_moviePlayerContentView.bounds]; [self.moviePlayerController setControlStyle:MPMovieControlStyleNone]; [self

objective-c MPMoviePlayerViewController done button language

ぃ、小莉子 提交于 2020-01-15 02:40:26
问题 im using a videoplayer - and realized that the "done" button seems to be labled with "done" even thogh i set "Localization native development region" to "Germany" i tried a web video and there it was labled with "fertig" maybe someone can help me with this. the code snip is here: MPMoviePlayerViewController *moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:fileURL]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playbackStateChange:) name

MPMoviePlayerController - catching network errors when loading a movie

☆樱花仙子☆ 提交于 2020-01-13 09:43:43
问题 Is there a way of catching exceptions (particularly for network errors / no connection available) when using a MPMoviePlayerController? I am particularly concerned that once an instance of the player is initialised with initWithURL: you have no way of knowing whether the movie load has failed for some reason. I have reviewed the available documentation and realise I can get a notification for loadState changes through moviePlayerLoadStateChanged:(NSNotification*)notification. Problem is the

MPMoviePlayerController - catching network errors when loading a movie

梦想的初衷 提交于 2020-01-13 09:42:52
问题 Is there a way of catching exceptions (particularly for network errors / no connection available) when using a MPMoviePlayerController? I am particularly concerned that once an instance of the player is initialised with initWithURL: you have no way of knowing whether the movie load has failed for some reason. I have reviewed the available documentation and realise I can get a notification for loadState changes through moviePlayerLoadStateChanged:(NSNotification*)notification. Problem is the

MPMoviePlayer controlStyle

最后都变了- 提交于 2020-01-11 11:12:05
问题 I want to hide the controls from the MPMoviePlayer with this code: -(IBAction)video:(id)sender { NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@"Intro" ofType:@"mov"]; NSURL *movie = [NSURL fileURLWithPath:moviePath]; MPMoviePlayerController *control = [[MPMoviePlayerController alloc]initWithContentURL:movie]; //[self.view addSubview: control.view]; control.scalingMode = MPMovieScalingModeFill; control.controlStyle = MPMovieControlStyleNone; control

How to enable iPhone auto lock during MPMoviePlayer playback?

喜欢而已 提交于 2020-01-11 05:12:13
问题 When I play a video with MPMoviePlayerController in my app my iPhone does not auto lock (tested OS 3.0 & 3.1.2). However, the application.idleTimerDisabled = NO, so this setting is not affected by MPMoviePlayerController. How can I get my iPhone to sleep normally (e.g. after 3 min screen dims, then goes dark) when my app is running and playing a video? 回答1: That is a feature of MPMoviePlayerController; most people don't want their screens turning off after three minutes of video if they haven

MPMoviePlayerController 视频播放器—IOS开发

蓝咒 提交于 2020-01-10 11:37:28
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> MPMoviePlayerController 与AVAudioPlayer有点类似,前者播放视频,后者播放音频,不过也有很大不同,MPMoviePlayerController 可以直接通过远程URL初始化,而AVAudioPlayer则不可以。不过大体上用起来感觉差不多。废话少说进入体验。 格式支持:MOV、MP4、M4V、与3GP等格式,还支持多种音频格式。 首先你得引入 MediaPlayer.framework.然后在使用到MPMoviePlayerController 的文件中导入相应的头文件。 一、创建 MPMoviePlayerController 类通过一个NSURL来初始化,这个URL可以使本地的,也可以是远程的。初始化需要通过 initWithContentURL 方法来实现: 源码 打印 ? MPMoviePlayerController * moviePlayer = [ [ MPMoviePlayerController alloc]initWithContentURL:[NSURL urlWithString:@"http://"] ];//远程 或者 源码 打印 ? NSString* path =[ NSString stringWithFormat:@"%@

moviePlayBackDidFinish and Transition's effect

北城以北 提交于 2020-01-07 05:31:44
问题 i would like to know how to add a transition ( fade in when the video is getting to start and fade out when the video is finished ). Could you please help him in this task, i'm kind of lost with transition, never play with it before /: here is my code - (void) startSlideShow { NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"2" ofType:@"mov"]]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; [[NSNotificationCenter

moviePlayBackDidFinish and Transition's effect

北城以北 提交于 2020-01-07 05:31:09
问题 i would like to know how to add a transition ( fade in when the video is getting to start and fade out when the video is finished ). Could you please help him in this task, i'm kind of lost with transition, never play with it before /: here is my code - (void) startSlideShow { NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"2" ofType:@"mov"]]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; [[NSNotificationCenter

How can I play a movie locally with the MPMoviePlayerViewController?

百般思念 提交于 2020-01-07 04:45:06
问题 I have an mp4 file called lebron.mp4 in my Resources folder: -(IBAction)videoButtonClicked:(id)sender{ NSString *url = [[NSBundle mainBundle] pathForResource:@"lebron" ofType:@"mp4"]; MPMoviePlayerViewController* moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:url]]; moviePlayerViewController.view.backgroundColor = [UIColor blackColor]; [self presentMoviePlayerViewControllerAnimated:moviePlayerViewController]; [moviePlayerViewController