Where do I put the url? [VERY EASY]

Discussion in 'iOS Programming' started by iPodphone, Mar 25, 2010.

  1. iPodphone macrumors newbie

    Mar 24, 2010
    -(void) playMovieAtURL: (NSURL*) theURL {
        MPMoviePlayerController* theMovie =
                    [[MPMoviePlayerController alloc] initWithContentURL: theURL];
        theMovie.scalingMode = MPMovieScalingModeAspectFill;
        theMovie.movieControlMode = MPMovieControlModeHidden;
        // Register for the playback finished notification
        [[NSNotificationCenter defaultCenter]
                        addObserver: self
                           selector: @selector(myMovieFinishedCallback:)
                               name: MPMoviePlayerPlaybackDidFinishNotification
                             object: theMovie];
        // Movie playback is asynchronous, so this method returns immediately.
        [theMovie play];
    // When the movie is done, release the controller.
    -(void) myMovieFinishedCallback: (NSNotification*) aNotification
        MPMoviePlayerController* theMovie = [aNotification object];
        [[NSNotificationCenter defaultCenter]
                        removeObserver: self
                                  name: MPMoviePlayerPlaybackDidFinishNotification
                                object: theMovie];
        // Release the movie instance created in playMovieAtURL:
        [theMovie release];
    In this code, which places do I fill in my url for playing the video.
  2. potaco macrumors regular

    Mar 12, 2010
    Aren't you passing it as a parameter?
  3. iPodphone thread starter macrumors newbie

    Mar 24, 2010
    I'm absolutely new to this stuff, so I have no idea. I just want to know where i put the url for the video.

Share This Page