• 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: quicktime movie inside an existing view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quicktime movie inside an existing view?


  • Subject: Re: quicktime movie inside an existing view?
  • From: Niall Dalton <email@hidden>
  • Date: Mon, 3 Dec 2001 11:35:10 -0800 (PST)

On Mon, 3 Dec 2001, [ISO-8859-1] Stiphane Sudre wrote:
> NSURL *movieUrl = [NSURL fileURLWithPath:filePath];
> theMovie = [[NSMovie alloc] initWithURL:movieUrl byReference:YES];
> theMovieView = [[NSMovieView alloc] initWithFrame: aRect];
> [theMovieView setMovie: theMovie];
>
> [[self get_view] addSubview: theMovieView];
>
> // play the movieview
>
> [theMovieView start: self];
>
> and do your drawing as usual in your drawInRect method.

While moving that code into the loadForDrawInRect sorts out the infinite
loop, it only gets me a blank view. I have this working for static images
via NSImage (load in it loadForDrawInRect), and
- (void)drawInRect:(NSRect)aRect
{
NSImageRep *imagerep;
imagerep = [[theImage representations] objectAtIndex:0];
[imagerep drawInRect:rect];
[super drawInRect:aRect];
}

will display the image. However, there does not appear to be a method
on NSMovie or NSMovieView to let me do something similar? Or am I going
about it in the wrong way to do this for movies?

niall


  • Prev by Date: Re: NSUserDefaults and the synchronize: method - doesn't seem to sync...
  • Next by Date: Re: Localize Hide / Show menu?
  • Previous by thread: quicktime movie inside an existing view?
  • Next by thread: Weird NSBrowser Behavior
  • Index(es):
    • Date
    • Thread