Search Results

Search found 123 results on 5 pages for 'mpmovieplayercontroller'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • Failed to set the initialPlaybackTime for a MPMoviePlayerController when recreating it in the second

    - by vicky
    Hi, everyone. It's really wired. When at the first time a MPMoviePlayerController (e.g., theMovie) is created, its initialPlaybackTime can be set successfully. But when theMoive is released and re-create a new MPMoviePlayerController, its intialPlaybackTime can not be set correctly, actually the movie always plays from the start. The code is as follows. -(void)initAndPlayMovie:(NSURL *)movieURL { MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; // create a notification for moviePlaybackFinish [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:theMovie]; theMovie.initialPlaybackTime = 15; [theMovie setScalingMode:MPMovieScalingModeAspectFill]; [theMovie play];} -(void) moviePlayBackDidFinish:(NSNotification*)notification { MPMoviePlayerController * theMovie = [notification object]; [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:theMovie]; [theMovie release]; [self initAndPlayMovie:[self getMovieURL]]; } With the above code, when the viewcontroller did load and run initAndPlayMovie, the movie starts to play from 15 seconds, but when it plays finished or "Done" is pushed, a new theMovie is created and starts to play from 0 second. Does anybody know what happened with the initialPlaybackTime property of MPMoviePlayerController? And whenever you reload the viewController where the above code is (presentModalViewController from a parent viewcontroller), the movie can start from any playback time. I am really confused what's the difference of the MPMoviePlayerController registration methods between the viewcontroller load and the recreating it after release. Need your help! Thank you!

    Read the article

  • Why is no video showing using MPMoviePlayerController

    - by nathanjosiah
    MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:@"http://feeds.harvest.org/~r/greglaurietv/~5/MW4zfyeubC8/HD100307-iPod.mp4"]]; moviePlayer.scalingMode = MPMovieScalingModeNone; moviePlayer.controlStyle = MPMovieControlStyleDefault; [moviePlayer play]; only audio is playing, but nothing shows up in my view.... what am i doing wrong?

    Read the article

  • How to keep MPMoviePlayerController open after movie ended?

    - by redguy
    If I use MPMoviePlayerController to play video in my iPhone app, it opens, loads the movie, plays it and then closes. Is it possible to force it to stay open after the movie finishes, so that user can replay it using its controls, instead of using controls in parent view? Also, is it possible to start MPMoviePlayerController in the paused mode? thanks for any advice.

    Read the article

  • How to get a MPMediaItem from MPMoviePlayerController?

    - by raziiq
    How can i get MPMediaItem from MPMoviePlayerController as i can get it in case of MusicPlayer as follows MPMediaItem *currentItem = self.musicPlayer.nowPlayingItem; But how to get it from MPMoviePlayerController? Is it even possible? Infact i want to get the information about the current movie item playing, for example its title, artist etc, is it possible to get the metadata for a video file?

    Read the article

  • MPMoviePlayerController - streaming works on 3GS, not on anything pre-3GS

    - by Canada Dev
    I am having some serious issues and annoyances with MPMoviePlayerController. In my app you can watch trailers for some movies in .mov format. I have tested with a friend and had users report that it does not work on their device, which are all 3G. I have tested on my own, a 3GS and playback works fine. I have tried on a 1st gen iPhone and it doesn't work. So I am lead to believe it's a memory issue, and that it's simply stopping the playback and returning to the previous screen. Below is the code I use to launch the player, which is straight out of the MoviePlayer example from Apple. MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:trailerURL]]; if (mp) { self.moviePlayer = mp; [mp release]; [self.moviePlayer play]; } I have tried to check the NSError from the notifications, but the only thing I get is "An unknown playback error occurred" for both the localizedDescription and localizedRecoverySuggestion, making it impossible to figure out exactly why it's not working. I have seen many examples of people who just have issues with the movie player, but it's starting to annoy me that it sometimes seem to work fine and other times it just doesn't (again, appearing like a memory issue). Thanks for any help/feedback provided

    Read the article

  • MPMoviePlayerController and status bar in iPad

    - by hgpc
    I want to show a MPMoviePlayerController in a view controller and let the user toggle full screen with the default controls. I'm using the following code in a bare-bones example: - (void)viewDidLoad { [super viewDidLoad]; self.player = [[MPMoviePlayerController alloc] init]; self.player.contentURL = theURL; self.player.view.frame = self.viewForMovie.bounds; self.player.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; [self.viewForMovie addSubview:player.view]; [self.player play]; } This works well until the user makes the video full screen, rotates the device and taps on the screen. The status bar is shown in the wrong position, as shown in the screenshot below. http://www.freeimagehosting.net/image.php?be371fe3e8.png What am I doing wrong?

    Read the article

  • iPad MPMoviePlayerController only hearing audio, no videos!

    - by Steph Moreau
    I am currently rebuilding my app for the iPad. I would like to play the videos sourced online. I display the information and when i go to play the video all i get is the audio... No video is shown at all. My page looks exactly the same except that i have some "background" noise. These are the same videos i use on the iPhone app and they work perfectly This is the code that i call to play my videos - (IBAction) playMovie{ NSURL *url = [NSURL URLWithString:vidMovie]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc]initWithContentURL:url]; [moviePlayer play]; } I am using this on a button on the right side view of a splitViewController. I get the same result in my simulator as on an iPad. Not sure if i'm missing something, but if anyone can help it would be greatly appreciated!

    Read the article

  • MPMoviePlayerController fullscreen quirk in iPad

    - by hgpc
    I want to show a MPMoviePlayerController in a view controller and let the user toggle full screen with the default controls, like the YouTube app. I'm using the following code in a bare-bones example: - (void)viewDidLoad { [super viewDidLoad]; self.player = [[MPMoviePlayerController alloc] init]; self.player.contentURL = theURL; self.player.view.frame = self.viewForMovie.bounds; self.player.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; [self.viewForMovie addSubview:player.view]; [self.player play]; } This works well until the user makes the video full screen, rotates the device and taps on the screen. The status bar is shown in the wrong position, as shown in the screenshot below. http://yfrog.com/5fimg0006ryp I'm working with the template Tab Bar Application for iPad. I've only added the viewDidLoad above, the view variables and an UIView in the XIB to show the movie player. What am I doing wrong?

    Read the article

  • How to release MPMoviePlayerController?

    - by 4thSpace
    I have a couple of views that access the movie player. I've put the following code in a method in AppDelegate for these views. They send in the filename to play. The code works fine but I know a release is required somewhere. If I add the last line as a release or autorelease, the app will crash once the user presses done on the movieplayer. MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:moviePath]]; moviePlayer.movieControlMode = MPMovieControlModeDefault; [moviePlayer play]; //[moviePlayer release]; I get this error: objc[51051]: FREED(id): message videoViewController sent to freed object=0x1069b30 Program received signal: “EXC_BAD_INSTRUCTION”. How should I be releasing the player?

    Read the article

  • Video loads but doesn't play with MPMoviePlayerController in iPad

    - by hgpc
    I'm using MPMoviePlayerController to play videos in an iPad app. Everything works well on the iPad simulator. On an actual device, the videos load but don't play, even if I press the play button. I can move the slider and see different frames of the video, but it never plays. I'm using the following code: moviePlayer = [[MPMoviePlayerController alloc] init]; moviePlayer.shouldAutoplay = YES; moviePlayer.contentURL = video.urlVideo; moviePlayer.view.frame = videoPlayerContainer.bounds; moviePlayer.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; [videoPlayerContainer addSubview:moviePlayer.view]; moviePlayer.controlStyle = MPMovieControlStyleEmbedded; [moviePlayer play]; Help?

    Read the article

  • Error Playing video from server with MPMoviePlayerController

    - by skiria
    I try to play a video on the server with this code. I have a error. //Play the video from server - (IBAction)playVideo:(id)sender; { NSLog(@"URLVIDEO %@", aVideo.urlVideo); MPMoviePlayerController *VideoPlayer = [[MPMoviePlayerController alloc]initWithContentURL:[NSURL URLWithString:aVideo.urlVideo]]; [VideoPlayer play]; } //Error on con console Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Content URL must not be nil.' aVideo.urlVideo is a NSString and it's correct when I copy the result on the NSLog on the browser.

    Read the article

  • MPMoviePlayerController seems to make 2 calls for each movie

    - by user76328
    I seem to have an issue where an iphone app using the MPMoviePlayerController seems to make 2 calls to the server for each video it wants to play back. This occurs with iphone 3.x OS and libraries but not with iphone 2.x. I know that iphone does progressive download and will make multiple 206 requests, etc. but as far as our back end is concerned the player appears to make 2 separate sessions. This only appears to be an issue with iPhone native apps and not iphone videos played through safari. Additional info from apple: iPhone OS 3.0 added support for streaming audio and video over HTTP, and MPMoviePlayerController must validate the media before playback to determine if it is streaming content or progressively downloaded content. This is the delay you are experiencing. On a fast network, the delay should be minimized. Is this double check causing 2 sessions be created for each video request? Any one else seeing same issue? Is there a remedy?

    Read the article

  • MPMoviePlayerController & .m3u8 playlist

    - by Thierryb
    Hello, I would like to use a .m3u8 playlist containing remote mp4 files with MPMoviePlayerController, did you success with this ? Does the .m3u8 must contain .ts file ?If not what is the purpose of .ts ? Does next / previous buttons will be enable once the playlist be loaded ? If not, what is the purpose of these buttons ? And last question, do you have a .m3u8 sample file with remote mp4 file to test ? Thanks a lot for your help. Thierry

    Read the article

  • MPMoviePlayerController fullscreen movie inside a UIWebView

    - by Wakazors
    Hi, I'm having a problem with the UIWebView and MPMoviePlayerController: My UIWebView have a movie inside the html (it's a local html file), I'm using html5 and a video tag for the video. The problem is: the user can set the video to play inline, directly on the html or he can tap the fullscreen button, but I need to know if the video is playing fullscreen. I've tried to use MPMoviePlayerDidEnterFullscreenNotification but with no success. Does anybody know how to get this notification from the webview? Thanks in advance

    Read the article

  • MPMoviePlayerController playback problem

    - by Fahri
    Hello all, I'm having trouble with playing audio stream using MPMoviePlayerController in the background. On the foreground it's playing the audio just fine, but when the application goes to the background, sound disappears and the time keeps going. I have initialized the AVAudioSession with AVAudioSessionCategoryPlayback and have put the required background modes to audio in info.plist file. Also I have set player.useApplicationAudioSession = YES;. What could be the possible problem here? Thanks in advance :)

    Read the article

  • How To Rotate An MPMoviePlayerController

    - by Dwaine Bailey
    I am building an iPhone app that plays videos on demand from a web service. The videos play in an MPMoviePlayerController, and everything works fine on the iPhone device. However, when one loads up the iPhone application on an iPad, the videos play Portrait mode (with letterboxing on the top and bottom), instead of Landscape Left like they do on the iPhone. At first the videos were not appearing at all, however I fixed this by adding the MPMoviePlayerControllers view to the view that is creating it, as a subview, and then set it to play fullscreen. -- Edit To Original: I now have it playing on the iPad in all rotations. Is there any way to stop it rotating, and just have it play LandscapeLeft? Thanks, Dwaine

    Read the article

  • How to detect touches on MPMoviePlayerController window and still having the standard playback cont

    - by gkedmi
    Hello I have the MPMoviePlayerController set up to play a movie.I want to detect a touch on the movie for bringing up few buttons.I used the code : // The movie's window is the one that is active UIWindow* moviePlayerWindow = [[UIApplication sharedApplication] keyWindow]; // Now we create an invisible control with the same size as the window UIControl* overlay = [[[UIControl alloc] initWithFrame:moviePlayerWindow.frame]autorelease]; // We want to get notified whenever the overlay control is touched [overlay addTarget:self action:@selector(movieWindowTouched:) forControlEvents:UIControlEventTouchDown]; // Add the overlay to the window's subviews [moviePlayerWindow addSubview:overlay]; but then the play back controllers doesn't appear , I guess because the player window doesn't get the touch.how can I keep the player controllers and still detects touches? thanks

    Read the article

  • MPMoviePlayerController not setting the bounds for background image

    - by VXtreme
    I am using MPMoviePlayerController for playing the media . I want to set the image at the background of the player.The image is set accordingly but when i set the bounds for the image then the image is not set according to bounds . I have tried following code: UIImageView *imageView=[[UIImageView alloc]initWithImage:[operationControl getCoverImage:stringId]]; imageView.bounds=CGRectMake(0, 100, 200, 200); [moviePlayer.backgroundView addSubview:imageView]; [moviePlayer.backgroundView setBackgroundColor:[UIColor purpleColor]]; moviePlayer.controlStyle = MPMovieControlStyleDefault; moviePlayer.shouldAutoplay = YES; [moviePlayer setScalingMode:MPMovieScalingModeAspectFit]; [self.view addSubview:moviePlayer.view]; [moviePlayer setFullscreen:YES animated:YES];

    Read the article

  • Ipad MPMovieplayerController video loads but automatically pauses when played

    - by slayerIQ
    Hello I am trying to get the MPMovieplayerController to work. I load a video everything goes wel i even see the first frame but then it automatically pauses, if i press play it pauses again. In the simulator it works perfectly but on the ipad device it gives the problem. I can even seek through the video and i see the frame i seeked to but nothing plays. This is some output from the console: 2010-06-08 22:16:13.145 app[3089:207] Using two-stage rotation animation. To use the smoother single-stage animation, this application must remove two-stage method implementations. [Switching to thread 12803] warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.2 (7B367)/Symbols/System/Library/VideoDecoders/VCH263.videodecoder" (file not found). warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.2 (7B367)/Symbols/System/Library/VideoDecoders/H264H2.videodecoder" (file not found). warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.2 (7B367)/Symbols/System/Library/VideoDecoders/MP4VH2.videodecoder" (file not found). warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.2 (7B367)/Symbols/System/Library/VideoDecoders/JPEGH1.videodecoder" (file not found). 2010-06-08 22:16:15.145 app[3089:207] setting file:///private/var/mobile/Applications/46CE5456-6338-4BBF-A560-DCEFF700ACE0/tmp/MediaCache/ I dont get those warning when using the simulator BTW. Does anyone know how to fix this ?

    Read the article

  • custom view on iphone's native media player(MPMoviePlayerController)

    - by sneha
    I am building an application that implements a custom view on iPhone’s native media player. I want your help in deciding directions to lay this effort. At present I have find out that iPhone SDK doesn’t support APIs to customize media player. I need these things in the player: I would like to have custom views i.e. want to change all control buttons on player like Play/Pause, seek bar etc. The background of player will also need to be different. The player has to play audio or video file from local/remote location. Can i use MPMoviePlayerController if it can be customized (How to do it ??). However, any other third party player approved by iPhone which has an ability to download and play the media file from local/remote location is also fine. It will be great to have an access to media player buffer so that it can be encrypted. I have following questions: 1.Any help in building/customizing player..... 2.Do you see issues in signing of application? 3.Does Apple have any restrictions on customizing media player? 4.Any sample iPhone application where media player is customized Any help in this regard is highly appreciated.

    Read the article

  • Pros and cons of MPMoviePlayerController versus launching UIWebView to stream movie

    - by Nosredna
    I have a client who has video content for the web in Flash format. My task is to help them show the videos in an iPhone app. I realize that step one is to get these videos into the appropriate Quicktime format for the iPhone. Then I'm going to have to help the client figure out how or where to host these files. If that's tricky I assume they can be hosted at YouTube. My chief concern, though, is which approach to take to stream the video. What are the pros and cons of MPMoviePlayerController versus launching UIWebView with the URL of the stream? Is there any difference? Is one of them more or less forgiving? Is one of them a better user experience? Any gotchas I might expect to run into? I'm assuming playing video is pretty easy on the iPhone. Is it reasonable to try both and have one available as a fallback, or would that be a waste of time? I'm trying to schedule this out a bit, so I'd love to hear real-world experiences from anyone who's done this.

    Read the article

1 2 3 4 5  | Next Page >