Re: Problems Hiding/Showing NSMovieView
Re: Problems Hiding/Showing NSMovieView
- Subject: Re: Problems Hiding/Showing NSMovieView
- From: "Douglas A. Welton" <email@hidden>
- Date: Fri, 04 Feb 2005 14:25:00 -0500
Michael,
Have you considered using a tabless NSTabView to "multi-task" the space that
you are concerned with? Alternately, you might want to consider subclassing
NSMovieView and handling the different situations in the -drawRect: method.
I did the following when I wanted to center my movie against a user-selected
color background.
later,
douglas
on 2/4/05 1:53 PM, Michael Diehr at email@hidden wrote:
> I have the need to set up a NSMovieView, start a movie playing, and
> then at a later point, hide the movie and display some text onscreen
> (where the movie player was), then un-hide the movie and resume
> playback.
>
> My strategy has been to do this:
>
> // stop the movie
> [movieView stop:self];
> // move the movieplayer way offscreen (-10000,-10000)
> [movieView setFrameOrigin:wayOffscreen];
> // set a flag to remind us to display the warning message in drawRect handler
> showWarningMessage = YES;
> // request a full window update
> [self setNeedsDisplay:YES];
>
> [... wait a while...]
>
> // move the movieplayer back to it's proper location
> [movieView setFrameOrigin:mpOrigin];
> // start playing
> [movieView start:self];
>
>
> Under 10.3 this works great.
>
> However, under 10.2, it fails in several different ways. First, if
> the movie is in fact a Flash track, then when I issue the second
> start command, the movie never resumes playback. Second, if the
> movie is a regular video track, then although it will resume playback
> fine, it never goes offscreen -- my warning message never gets
> displayed -- the last frame of the movie stays onscreen.
>
> Is there a better way to do this? I see that under 10.3 you can now
> make a NSView 'hidden' but this is not available in 10.2.
>
> How do you tell quicktime "Hey, please start playing that movie again!"
>
> NB: I think there is a general bug in quicktime with respect to
> resizing or movie windows. For example, fairly often in QuickTime
> Player, or when viewing files in the Finder's Column view, I can get
> in a state where the movie is playing, but nothing is happening
> onscreen. Only by adjusting the playback size can I get quicktime to
> "resync" and actually resume displaying data...
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> QuickTime-API mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> k.net
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden