Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 402319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:06:51+00:00 2026-05-12T17:06:51+00:00

In MonoTouch, we ran into this problem with the Movie Player sample in that

  • 0

In MonoTouch, we ran into this problem with the Movie Player sample in that it would only play the video once, but would not play it a second time.

I am asking this question to post an answer, since it has been hitting various folks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:06:52+00:00Added an answer on May 12, 2026 at 5:06 pm

    MPMoviePlayerController is a singleton underneath the hood. If you have not properly release’d (ObjC) or Dispose()’d (MonoTouch) and you create a second instance, it will either not play, or play audio only.

    Additionally if you subscribe to MPMoviePlayerScalingModeDidChangeNotification or MPMoviePlayerPlaybackDidFinishNotification or MPMoviePlayerContentPreloadDidFinishNotification, be warned that the posted NSNotification takes a reference to the MPMoviePlayerController as well, so if you keep it around, you will have a reference the player.

    Although Mono’s Garbage Collector will eventually kick-in, this is a case where deterministic termination is wanted (you want the reference gone now, not gone when the GC decides to perform a collection).

    This is why you want to call the Dispose () method on the controller, and the Dispose() method on the notification.

    For example:

    // Deterministic termination, do not wait for the GC
    if (moviePlayer != null){
        moviePlayer.Dispose ()
        moviePlayer = null;
    }
    

    If you were listening to notifications, call Dispose in your notification handler at the end, to release the reference that it keeps to your MPMoviePlayerController for example:

    var center = NSNotificationCenter.DefaultCenter;
    center.AddObserver (
        "MPMoviePlayerPlaybackDidFinishNotification"),
        (notify) => { Console.WriteLine ("Done!"); notify.Dispose (); });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I accidentally bumped into an ad like this: http://monotouch.net/DownloadTrial?ref=so1 . Then I start to
This question is a duplicate of 1042830 , but MonoTouch-specific. Is there a way
Monotouch compiles the app into the native code. How can Apple know that the
This Monotouch code below will not cause an exception, but it also won't show
I am using fastJSON and I ran into a problem. I cannot take a
I downloaded the Red Laser MonoTouch sample and ran the project in MonoDevelop, I
I've just installed monotouch and having a problem with my first build of an
I wanted to use monotouch, but unfortunately I don't have $400 to spend. So
I'm creating a MonoTouch app that has some declarative business logic that the client
MonoTouch preferred, but Obj-C ok too My MainWindow.xib has a NavigationView and a View.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.