mpmovieplayercontroller

app crashes after checking network reachability in iphone?

折月煮酒 提交于 2019-12-07 07:30:59
问题 i have a mpmovieplayercontroller to play online music and avaudiosession to play the same music at background, when the first time app launches without network access, normally i shows "no internet connection" , when i tried after connecting to internet and playing it shows the error *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'An AVPlayerItem cannot be associated with more than one instance of AVPlayer' my code is here static MPMoviePlayerController

Playing Movies from ITunes using MPMoviePlayerController?

六月ゝ 毕业季﹏ 提交于 2019-12-07 06:56:23
问题 I'm trying to play a movie acquired from iTunes. The movie was placed in my sandbox via File Sharing/iTunes Transfer. The application is using MPMoviePlayerController or MPMoviePlayerViewController . I can use either, but neither have work properly on an iTunes movie. Below is what I am observing: Test Movie Acquired from Hillegass (Chapter 20) - OK [1] Acquired from Apple's sample - OK [2] Apple Video app - OK iTunes Movie No video No audio Silent failure in my application [3] Silent failure

MPMoviePlayerController Overlay iOS 6

元气小坏坏 提交于 2019-12-07 05:53:41
问题 Having an issue with MPMoviePLayerController with an overlay in iOS6, prior to iOS6 things were working fine. It seems I can play a movie in full screen, before I had this code: @interface MovieOverlayViewController : UIViewController { UIImageView *skiparrow; } @end @implementation MovieOverlayViewController -(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; touchtoskip.frame = CGRectMake( xAdjust, yAdjust, touchtoskip.image.size.width / scale, touchtoskip.image.size

WARNING: under normal conditions, _fillInQueueWithExtraSpace:ignoreExistingItems: should not be re-entered

谁说我不能喝 提交于 2019-12-07 03:47:46
问题 This is my class that managed my video: #import "video.h" #import <MediaPlayer/MediaPlayer.h> @interface video() { MPMoviePlayerController* videoView; } @end @implementation video static video *sharedSingleton = nil; + (video *)sharedSingleton { @synchronized([video class]) { if (!sharedSingleton) sharedSingleton = [[super allocWithZone:NULL] init]; return sharedSingleton; } return nil; } - (id)init { self = [super init]; CGRect dimVideo = CGRectMake(0, 0, 472, 400); NSURL* videoPath = [

MPMoviePlayerController does not remove view when clicking done

浪子不回头ぞ 提交于 2019-12-07 01:35:22
问题 I am creating a MPMoviePlayerController object and streaming a video in full screen mode. I am using a UIViewController to display the movie view. - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; //http://www.youtube.com/watch?feature=player_detailpage&v=ebeQaznNcmE NSURL *url = [NSURL URLWithString:@"http://a1408.g.akamai.net/5/1408/1388/2005110405/1a1a1ad948be278cff2d96046ad90768d848b41947aa1986/sample_mpeg4.mp4"]; MPMoviePlayerController *mPlayer = [

Why MPMoviePlayerController fullscreen button icon change to caption icon in iOS 10?

北城以北 提交于 2019-12-06 20:53:56
问题 I try to use MPMoviePlayerController as embedded video player but I spot a problem where the fullscreen icon were changed in iOS 10? Is there any solution to change it back to original fullscreen button ? Thank you, This is what it look like in iOS 8 and iOS 9: This is what it look like in iOS 10: 回答1: Here is some code to workaround that iOS 10 bug which you can write in a WorkaroundInlinePlayerFullScreenButtonBug.m file: @import MediaPlayer; @import ObjectiveC; static void (

Play MP4 using MPMoviePlayerController() in Swift

℡╲_俬逩灬. 提交于 2019-12-06 16:31:59
问题 I can't for the life of me figure out a way to play an MP4 that takes up the entire background in a UIViewController . So far I have the following, which doesn't even play the video at all. I can confirm that the bokeh.mp4 video exists because if I change the file to something else then it throws an error that it's missing. override func viewDidAppear(animated: Bool) { let filePath = NSBundle.mainBundle().pathForResource("bokeh", ofType: "mp4") self.moviePlayerController.contentURL = NSURL

MPMoviePlayerViewController won't play movie, start and closes immediately

↘锁芯ラ 提交于 2019-12-06 16:24:16
I'm trying to play a video with MPMoviePlayerViewController, I present the MPMoviePlayerViewController but after 1 second he is dismissing itself. This is my code: .h: #import <MediaPlayer/MediaPlayer.h> @property (strong, nonatomic) MPMoviePlayerViewController *moviePlayerViewController; .m: - (void)playmovie { NSString *databaseName = @"NO.mp4"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentDir = [documentPaths objectAtIndex:0]; NSString *databasePath = [documentDir stringByAppendingPathComponent:databaseName];

MPMoviePlayerController playing YouTube video

我是研究僧i 提交于 2019-12-06 11:24:04
How can I play a YouTube video in an MPMoviePlayerController on the iPhone while avoiding going into fullscreen mode? This question has been raised here: MPMoviePlayerController is playing YouTube video? and here: Play Youtube video in MPMoviePlayerController or play RTSP - 3GP link with answers claiming such functionality was impossible. Yet this app, Deja, has exactly the functionality I would like: a seamless MPMoviePlayerController whose frame I have explicit control over. http://itunes.apple.com/app/deja/id417625158 How is this done!? add this sample into you project instantiate

iOS 8 video progress bar not visible

一曲冷凌霜 提交于 2019-12-06 10:46:18
I have an iOS app in which I am trying to show videos using MPMoviePlayerController . The code is very simple and working fine on all the devices with all iOS version greater than 6.0. But the problem is on iOS 8 and 8.1, the progress bar of the video is not visible as shown in below image. I dont understand why this is happening or is this iOS 8 bug. Please suggest. Thanks in advance. I had this issue too in my app, which supports several iOS versions but this issue is indeed only visible on iOS 8. My code toggles the MPMoviePlayerController 's controlStyle between MPMovieControlStyleEmbedded