IPhone: Sending stop/start to MPMoviePlayerController restarts the movie

The class reference for the "play" method of MPMoviePlayerController says, " If you stop a movie before it finishes, using the stop method, invoking this method again resumes playing it from the beginning of the movie."
But when I run this code, which uses a timer to start and stop the movie, the movie always starts from the beginning again when the play method is called from the timer.
self.videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:_movieURL];
iVideoPlayer.scalingMode = MPMovieScalingModeAspectFill;
iVideoPlayer.userCanShowTransportControls = NO;
[NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(startStopTimer:) userInfo:nil repeats:YES];
iIsPlaying = TRUE;
[iVideoPlayer play];
- (void)startStopTimer:(NSTimer*) aTimer
if (iIsPlaying)
NSLog(@"Received a timeout, stopping video playback");
[iVideoPlayer stop];
iIsPlaying = FALSE;
else
NSLog(@"Received a timeout, starting video playback");
[iVideoPlayer play];
iIsPlaying = TRUE;

I think it's a documentation error. MPMoviePlayerController.h has this:
// If visible, stops playback and then hides the player. Calling play again will start movie at beginning.
- (void)stop;

Similar Messages

  • HT1386 my iphone suddenly stopped synchronizing!!! the message is "sync failed to start"..... any idea what to do?

    my iphone suddenly stopped synchronizing!!! the message is "sync failed to start"..... any idea what to do?

    With iPhone still connected, restart Mac's iTunes.

  • When i did an actualitation of the softaware (iOS 8.2) the camera of my iPhone 5 stopped working, Now only working the frontal camera

    I Need to know why the camera of my iPhone 5 stopped working when i did the software actualitation to the iOS 8.2

    Hi Totoyseje, 
    Thanks for visiting Apple Support Communities. 
    If the camera on your iPhone 5 stopped working, see this link for some troubleshooting steps that can help:
    Get help with the camera on your iPhone, iPad, or iPod touch - Apple Support
    Best Regards,
    Jeremy 

  • IPhone 4, stopped 6.0 upgrade in the middle of install, and now I just get the blinking apple.  Can't even get it to restore or recognize my phone when I plug into the computer/itunes....

    iPhone 4, stopped 6.0 upgrade in the middle of install, and now I just get the blinking apple.  Can't even get it to restore or recognize my phone when I plug into the computer/itunes....

    Did you try to connect in recovery mode? iPhone and iPod touch: Unable to restore

  • Acrobat Pro for Mac won't start, even after restarting the machine.  Any suggestions?

    Acrobat Pro for Mac won't start, even after restarting the machine.  Any suggestions?

    Hi Patrick,
    Can you please mention the version of Adobe Acrobat that you are using and on what OS version. Also mention whether this problem has started recently and was running fine earlier or is it a fresh install and has never worked for you.
    Have you tried uninstalling and reinstalling the product after you started facing this issue.
    -Shashi

  • IPhone 4s wont start-it's showing the iTunes symbol and the charging cable symbol

    My husbands iPhone 4s wont start-it's showing the iTunes symbol along w/ the charging cable sumbol. I tried to press on the two buttons at the same time and only the sumbols reappear. I'm afraid to plug it to the laptop since my information-my back up is on that laptop. What do u reconmend?

    Your iPhone is in recovery mode and because a reset did not resolve the issue you are left with plugging the iPhone into a computer with iTunes and restoring it to factory settings.

  • TS2621 Cannot access my yahoo mail in iPad. Receive it on my iPhone. Have stopped & started both. Put the fetch to "off" & manually. Not sure what else to do.

    Cannot access my yahoo mail in iPad. Receive it on my iPhone. Have stopped & started both. Put the fetch to "off" & manually. Not sure what else to do.comes up with message "connection to server failed". This started when I transferred my service to a iPhone 4 to a 4s.

    Reinstalling would be about the most useless thing you could do, given that the test with the other User account works -- that means the application is OK.
    The next step that would be indicated would to remove the com.apple.mail.plist file from Home/Library/Preferences, after having Quit Mail. Subsequently when you relaunch Mail it will open as though New, but if you only enter the setup information for each account, and DECLINE when prompt to ask if you want to Import anything. Mail should rediscover the existing account folders, and all should be well.
    As a precaution, open Home/Library and locate the Mail folder -- Duplicate the Mail folder, and drag the resulting copy to the Desktop for temporary backup.
    Ernie

  • ITunes stops during playback and won't start until I restart the computer

    I'm hoping someone can help me with this. I just reformated my computer and placed all the updates and programs back onto my computer. I had iTunes on my computer before and I reinstalled it then upgraded it to version 7.3.2.6. Now I've been reintroducing music back into the library on a folder by folder method (drag and drop). Anyway, during review of the songs I will get a random issue where the iTunes just stops during playback. I have shut down the program and restarted it. I've also shut down the following programs at different times to see if it would help:
    iPodService, ITunes.exe (the program), iTunesHelper, and even taskmgr.exe. Nothing seems to help. When I restart the program I click on play (any song or playlist) and nothing happens. The only thing that I have found to help is rebooting my computer. Does anyone have any ideas?
    I've check the event logs and nothing is showing in there and other programs are working without an issues.
    Please help!

    Any suggestions on what this can be?
    A dead battery.  Buy a new one.

  • On my iPhone I cannot start iTunes anymore, because the loginscreen (appleID) wil not dissapear

    suddenly it's impossible to start iTunes on my iPhone. When starting iTunes on my iPhone the Apple-ID login-window appears. I compete this with my loginname and password but the login-window appears again. And again, again, again ..... Not untill I stop iTunes this login window hinders me to do anything else on my iPhone then to fill out my apple-ID and password.
    Off course I've tried some things to fix this problem: in my iTunes-account (on my Macbook) first I deleted the matched devices and on my iPhone I refreshed all iCloud-logins. But nothing solved my problem, so still I'm unable to start iTunes on my iPhone (4S).
    I hope someone can help me with this, I mis my music when driving my car....

    Hi vanmarly,
    First I would try restarting and resetting the device:
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    If the issue persists, it might be worth trying to restore the device:
    iOS: How to back up and restore your content
    http://support.apple.com/kb/ht1766
    Take care,
    - Ari

  • I did an automatic update to my daughter's iphone and it did not complete teh update. I tried to restore my updated setting but now my iphone will not start. I see the apple and a white line that never moves past 15%.

    I did an automatic update to my daughter's iphone and it did not complete the update from version 6.0 to I believe 8. I waited for hours but the line stopped at 70%. I tried to restore my old settings but now my iphone will not start. When I try to start the
    phone, I see the apple and a white line that never moves past 15%.

    Hi JG14usa,
    Welcome to the Apple Support Communities!
    I understand that you attempted an update on your daughter’s iPhone but the update will not complete. For this type of situation, it may be necessary to place your iPhone into recovery mode and restore. Please use the instructions located in the attached article to complete this process. 
    If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
    Best regards,
    Joe

  • Firefox won't start properly. The process begins in task manager, but the program doesn't start.I have restarted the computor, and updated my plug-ins. Don't know what to do next. It will open in safe mode, but not regularly.

    When we click on the icon to start firefox even though the process opens in task manager, the program screen doesn't open

    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • IPhone 3G stops receiving text messages in the middle of a conversation

    My iPhone 3G 3.1.2 frequently stops receiving text messages in the middle of a back-and-forth texting conversation. No other function on the phone seems to be interrupted, because I usually just continue using other apps before I realize it's been 10 minutes since the other person last replied.
    I can receive the messages by turning the phone off and on (once I realize what's going on), but this is such a hassle, especially because I can waste 15 minutes of another person's time in the process. Interestingly, once I turn the phone back on, I receive the messages and they tell me they were received at the earlier time (ie., if I was previously texting at 1:53, it might say 1:55, even though nothing showed up AT 1:55). So it seems like the phone receives the text and knows that it did, but for some reason doesn't display it or notify me at the time.
    I've seen similar threads in this forum to this problem, but they all seem to be accompanied by other malfunctions, which this is not.
    I'm on Telus in Canada.

    iMessage is down:
    http://www.apple.com/support/systemstatus/

  • I hired a movie and half way through it stopped loading so i exited the movie and it vanished, when i clicked on the movie again it asked if i wanted to rent it???

    i rented a movie from the apple store off my apple TV half way through the movie it stopped like it was waiting for it start loading. i then exited the movie and went to click on it again but found that the movie was no longer there and when i clicked on the same movie it asked it i wanted to rent it, which i had just done. i would just like to know what happened here and how to fix this?

    This has happened to me 3 consecutive times!!
    3 movies. 3 mysterious stopages in mid movie with no fix.
    If only they solved their own problems as quickly as the scoffed your money!
    I have no idea how to report it.
    Apple only wants to communicate with you when you want to purchase products but makes it brutaly painfull to solve problems.
    They have become a pathetic, gready symbol of sloppy excess.
    They WIIL fail because they forgot how deliver their products.
    I was a lifelong apple user and that is over for good!
    I've been ripped off by them for the last time!
    There's too much competant competition out there now.

  • I bought a movie on itunes an it said that my internet connection was bad in the middle of the download and the movie stopped, I had paid for the movie but it never came. How I get my money back or the movie?

    how o i get my monet back or even get the movie?

    On itunes, at the top of the screen, click 'store' then click 'check for available downloads' and if your internet connection is good, it will finish downloading your movie

  • Does IIS Reset stop/start or IIS Restart fix template issues? See photos.

    I have been having major template issues over the past couple of weeks where several templates give me access denied. I have been in contact with Microsoft about the issue, but after 2 days and 5 hours on the phone, the issue still cannot be resolved.
    I then tried to use old sites that had the templates and "Save Site as Template". The new template that was saved are stored in the Solutions Gallery (template is "activated"). 
    I ran the create new site process and chose the new template that I saved. 
    The template looked like this last week,
    Now the template looks like this today.
    In between last week and this week, I did an SP2 installation to Project Server 2010/SharePoint 2010. 
    I also did an IIS Reset /stop and IIS reset/ start
    I also went into the IIS Manager on the central administration server and clicked "Restart".
    This is a very time sensitive issue, and want to know how I accidentally resolved the issue. It's very weird that any of these above would change the template, but somehow it did. I do not want to reset IIS if I do not have to. If anyone has any idea on
    how this could have gotten resolved it would be greatly appreciated.

    Hi TR,
    Not sure if iisreset always fixes this issue.
    Sorry for my misleading description, I thought that there was a possiable that some js/css files weren't loaded in the browser randomly for new site created based on the template, so I think maybe some js/css files customized
    and referenced in the orginal site (or in new site) may need to be checked-in and published.
    Now I think is it possible that the issue is related to js/css load sequence in browser? or is it browser compatible issue(maybe not based on iisreset)?
    Or you may try add new site in trusted site in IE see if it helps.
    Also check if browser F12 developer tool could provide some useful information.
    Thanks
    Daniel Yang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for