• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MPMoviePlayerController setContentURL twice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MPMoviePlayerController setContentURL twice


  • Subject: Re: MPMoviePlayerController setContentURL twice
  • From: Heath Borders <email@hidden>
  • Date: Tue, 22 Mar 2011 08:30:57 -0500

Your code worked!  Thanks!  The main difference between our snippets
was that you added the MPMoviePlayerController's view directly to the
UIViewController's view rather than putting it in a holder view (which
I doubt would matter) and that you aren't using the embedded controls.
 I'll post back when I figure out what went wrong.

-Heath Borders
email@hidden
Twitter: heathborders
http://heath-tech.blogspot.com



On Mon, Mar 21, 2011 at 11:50 PM, Matt Neuburg <email@hidden> wrote:
> On Mon, 21 Mar 2011 22:59:04 -0500, Heath Borders <email@hidden> said:
>>That's exactly what I did.  I have a brand new project with just a
>>ViewController with 3 views
>>
>>[SNIP ridiculous quantities of code]
>
> I can't read that. And it isn't what I suggested you do. I said make a *minimal* project. Enough to prove to yourself that setting the contentURL works. And no more than that! Here's my code; this is what I mean when I say "minimal" and "simple" and stuff like that:
>
> - (void)viewDidLoad {
>    [super viewDidLoad];
>    MPMoviePlayerController *player = [[MPMoviePlayerController alloc] init];
>    player.shouldAutoplay = NO;
>    player.controlStyle = MPMovieControlStyleNone;
>    [player.view setFrame: CGRectMake(0,0,200,150)];
>    [self.view addSubview: player.view];
>    self.thePlayer = player;
>    [player release];
>
> }
> - (IBAction)play1:(id)sender { // button 1
>    [self.thePlayer setContentURL: [[NSBundle mainBundle]
>        URLForResource:@"blend1" withExtension:@"mp4"]];
>    [self.thePlayer play];
> }
>
> - (IBAction)play2:(id)sender { // button 2
>    [self.thePlayer setContentURL: [[NSBundle mainBundle]
>         URLForResource:@"xbox" withExtension:@"mp4"]];
>    [self.thePlayer play];
> }
>
> That's all. It works. So then you build up from there towards what you *really* want to do. When it stops working, that's when you broke it. m.
>
>
> --
> matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
> A fool + a tool + an autorelease pool = cool!
> Programming iOS 4!
> http://www.apeth.net/matt/default.html#iosbook
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: MPMoviePlayerController setContentURL twice
      • From: Heath Borders <email@hidden>
References: 
 >Re: MPMoviePlayerController setContentURL twice (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Edit NSScrollView text
  • Next by Date: Re: MPMoviePlayerController setContentURL twice
  • Previous by thread: Re: MPMoviePlayerController setContentURL twice
  • Next by thread: Re: MPMoviePlayerController setContentURL twice
  • Index(es):
    • Date
    • Thread