quicktime movie inside an existing view?
quicktime movie inside an existing view?
- Subject: quicktime movie inside an existing view?
- From: Niall Dalton <email@hidden>
- Date: Mon, 3 Dec 2001 10:37:27 -0800 (PST)
hi,
I'm trying to load a quicktime movie into a subview of an open window..
with bugger all luck. Perhaps someone can suggest a quick way to do this?
Its just a quick hack, so major redesigns would not be appreciated;-)
In a class I have a function:
- (NSRect)loadForDisplayInRect:(NSRect)aRect
in which (among other things) I'm doing:
NSURL *movieUrl = [NSURL fileURLWithPath:filePath];
theMovie = [[NSMovie alloc] initWithURL:movieUrl byReference:YES];
theMovieView = [[NSMovieView alloc] initWithFrame: aRect];
[theMovieView setMovie: theMovie];
In another function in that class
- (void)drawInRect:(NSRect)aRect
I'm doing:
[[self get_view] addSubview: theMovieView];
// play the movieview
[theMovieView display];
[theMovieView start: self];
[super drawInRect:aRect];
which does nothing, just seems to get stuck somewhere in an infinite
loop..
any suggestions or sample code on loading a movie into an area
(bounded by a rect) of an existing view?
Thanks!
niall