mpmovieplayercontroller

How to add a KVO to MPMoviePlayer currentPlaybackTime?

被刻印的时光 ゝ 提交于 2019-12-12 08:48:26
问题 How can I add a KVO to the currentPlaybackTime property of a MPMoviePlayer class? 回答1: You cannot add a KVO to currentPlaybackTime since the property is not explicitly declared as KVO compatible. Instead, you could try polling the player regularly and storing the position, with code such as: - (void) BeginPlayerPolling { self.pollPlayerTimer = [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(PollPlayerTimer_tick:) userInfo:nil repeats:YES]; } - (void) PollPlayerTimer

Funky errors using MPMoviePlayerViewController

你说的曾经没有我的故事 提交于 2019-12-12 08:27:21
问题 Does anyone know what these error's mean? I get this when I click a button to play a video (download over internet on demand style). The problem I'm having is that my video plays with no audio. In fact the audio volume bar goes away completely on load. I have the feeling it has something to do with these errors heh. ~~>>SponViewController :sponButton: 2011-10-26 12:52:04.212 myapp[2692:12e03] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle

MPMoviePlayerController stops playing after a few seconds

北慕城南 提交于 2019-12-12 07:57:53
问题 MPMoviePlayerController stops playing after a few seconds, this is the code I'm using: 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]; } The error im getting in the console is: 2012-09-23 18

itemFailedToPlayToEnd - MPMoviePlayerController - iOS7

爷,独闯天下 提交于 2019-12-12 07:46:57
问题 Running into a weird issue while updating my app for iOS 7 . For iOS 6 , there is no problem and the videos are always loaded. However that is not the case here. I have a scrollview which displays playlistItems - and once you click on the playlistItem , a MPMoviePlayerController is created to show the playlist item (video). Here is the method that I believe is causing issues: - (void) play:(NSInteger)itemId withAutostart:(BOOL)autostart { // remember whether it is in fullscreen or not to

NSURLConnection finished with error - code -1002

柔情痞子 提交于 2019-12-12 07:32:11
问题 Friends i have simple audio player (MPMoviePlayerController) which can play audio stream. On iOS 11 i have very interessing trouble, thousand time i have error and my stream was stopped: NSURLConnection finished with error - code -1002 I paste this code (this code i saw on stackowerflow) but it's not help to me: <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> <key>NSExceptionDomains</key> <dict> <key>cast.mysite.com</key> <dict> <key

MPMoviePlayerController playback terminates before video finishes

☆樱花仙子☆ 提交于 2019-12-12 06:08:59
问题 I'm having trouble understanding this class and getting it to work properly, here is the piece of code where I use it: MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:_videoURL]; UIImage *videoThumbnail = [moviePlayer thumbnailImageAtTime:0 timeOption:MPMovieTimeOptionNearestKeyFrame]; [lastImageView setImage:videoThumbnail]; [moviePlayer setControlStyle:MPMovieControlStyleNone]; [moviePlayer setShouldAutoplay:YES]; [moviePlayer prepareToPlay];

UIImagePickerController mediatype kUTTypeMovie runtime exception

£可爱£侵袭症+ 提交于 2019-12-12 04:57:34
问题 I am developing an iPhone App where I need to only view all the videos present in the Photos Library of a device. I am using the following code UIImagePickerController picker = [[UIImagePickerController alloc] init]; picker.mediaTypes = [NSArray arrayWithObject:(NSString*)kUTTypeMovie]; I have imported and added the MobileCoreServices framework to my project. It works great on the iPhone 3GS, running on iOS 4.3, but when I run it on my iPod Touch, having iOS 4.2.1, it shows a runtime

MPMoviePlayerController repeat mode not working in viewDidLoad

∥☆過路亽.° 提交于 2019-12-12 04:47:55
问题 It seems that I'm having a problem with repeatmodeone: it does not repeat the video. This is the code for the video I have in the implementation: - (void)viewDidLoad{ NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Space Particle" ofType:@"mp4"]]; MPMoviePlayerViewController *playerController = [[MPMoviePlayerViewController alloc]initWithContentURL:url]; [self presentMoviePlayerViewControllerAnimated:playerController]; [playerController.moviePlayer prepareToPlay];

-[MPTransportButton _isChargeEnabled]: message sent to deallocated instance 0x4bf6cb0

拈花ヽ惹草 提交于 2019-12-12 04:43:42
问题 I'm using the MPMoviePlayerViewController to play a video. The videoplayer will shown as presentModalViewController . If the video is finished and the view is dismissed. I get the error : -[MPTransportButton _isChargeEnabled]: message sent to deallocated instance 0x4bf6cb0 But I have no idea, where the error comes. Thanks in advance. Greeting, Patrick 回答1: The message says: object of class MPTransportButton whose value was stored at 0x4bf6cb0 has been released and then used again. So, you

iPhone 4.0 problem.. MPMoviePlayerViewController , AVAudio APIs

回眸只為那壹抹淺笑 提交于 2019-12-12 03:46:42
问题 I'm making iphone program. The main function is playing video files, and recording sound. OS 3.1.3 version is fine. But iPhone 4.0 makes problem!! When I executed playing video ( MPMoviePlayerController ) and continuously recording sound ( AVAudioRecorder ), AVAudioRecorder doesn't work.... No recording..! ;o; Somebody help!! 回答1: Check the useApplicationAudioSession property on MPMoviePlayerController . In iOS 3.1.x, the movie player was always getting its own system provided audio session.