QuicktimeComponent no mouse events


#1

The same issue as with the WebBrowser.
You can test it in the Juce Demo too, no mouse events go to the component (there is no modal window), i can’t press pause move the position and so on.

Will you be dropping support for quicktime anytime soon?


#2

Yes, that’s not surprising. I’m sure it’s fixable, but a bit of a pain to do.

And no, I’ve no plans to drop quicktime support. (Unless Apple stop providing a windows version of course)


#3

Hi all,

I have fixed “QuickTimeComponent no mouse event” issue in my application .
I have changed the QTMovieView implementation in Juce_1.50 now it’s working fine for all mouse event.


class QuickTimeMovieComponent;

END_JUCE_NAMESPACE
using namespace JUCE_NAMESPACE;

@interface QTMovieViewComponent : QTMovieView
{
	QuickTimeMovieComponent*   _pQuickTimeMovieComp;      //if needed.
	
}

- (id)initWithFrame: (NSRect)frame  Owner:(QuickTimeMovieComponent*)Owner_ ;

- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent;

-(NSView*)hitTest:(NSPoint)aPoint;

@end


@implementation QTMovieViewComponent

- (id)initWithFrame: (NSRect)frame Owner:(QuickTimeMovieComponent*)Owner_
{
	self= [super initWithFrame: frame];
	if(self) 
	{
        _pQuickTimeMovieComp = Owner_;
		
 /* This will make the juce component next responder after QTMovieView(event will be redirected to NSView 
      that is being redirected to juce component in the implementation).it can be  redirected to 
     juce component to directly handle the mouse event.       */
    
		[self setNextResponder:[self superview]];
	}
	
	return self;
}


/* This is the delegate method that is executed whenever mouse down occures on view so this will return nil.
   There fore event is sent to next view that is Juce component  */

-(NSView*)hitTest:(NSPoint)aPoint
{         
	return nil;
}



- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
{
	return YES;
}



- (void) dealloc
{
    [super dealloc];
}

@end

//==============================================================================


BEGIN_JUCE_NAMESPACE


QuickTimeMovieComponent::QuickTimeMovieComponent()
    : movie (0)
{

	
    setOpaque (true);
    setVisible (true);

    QTMovieViewComponent* view = [[QTMovieViewComponent alloc] initWithFrame: NSMakeRect (0, 0, 100.0f, 100.0f)  Owner:(QuickTimeMovieComponent*)this ];
    setView (view);
    [view release];       
}

just try this, I hope it will work.


#4

Thanks, that’s interesting, but I guess that it’ll stop the QT controller from working?


#5

Yes, QTController won’t work . If needed , we can add QtController then we’ll have to remove “-(NSView*)hitTest:(NSPoint)aPoint” method
and override required mouse event in QTMovieViewComponent(e.g subclass of QTMovieView). Further more if mouse event is needed on juce component
make a abstract class with pure virtual functions, call it in overridden mouse event and give the definition in application’s derived class. earlier I had implemented
in my app but it was little difficult to handle all mouse event so I removed controller.