[Mono-osx] Disabling Pause in QTMovie and detecting Mouse/Keyboard events in QTMovieView

CircleOf14 alfredomachin at hotmail.com
Fri Oct 21 03:40:45 EDT 2011


Hello. In my MonoMac project I have a window with a QuickTime Movie View
object in the center. I've configured the Movie View to not show any
controls (Play, Pause, Stop etc.). I can load and play a movie fine through
code. When a user clicks on the move that is playing, the movie pauses.
These are my questions: 

1. Is there a way to disable this pausing behavior? I tried to disable the
pausing using the QTMovie.DontInteractWithUserAttribute like this:  

var keys = new NSString[] { QTMovie.DontInteractWithUserAttribute,
QTMovie.FileNameAttribute};
var values = new NSObject[] {NSNumber.FromBoolean(true) ,
(NSString)"Content/sample.mov"};
NSDictionary nsd = NSDictionary.FromObjectsAndKeys (values,keys);
MonoMac.Foundation.NSError respErr = new MonoMac.Foundation.NSError();
MonoMac.QTKit.QTMovie vidCs1 = new MonoMac.QTKit.QTMovie(nsd, out respErr);

…but the user can still pause the movie simply by clicking on it.

2. If I won't be able to change that pausing behavior then how can I detect
if the movie is paused or has stopped? I tried QTMovie attribute IsActive,
but that does not seem to have anything to do with whether the movie is
playing, stopped or paused.

3. How do I detect events like MouseDown, KeyDown and the position (x,y
coordinates) of the Mouse when interacting with the QuickTime Movie View? I
know how to override those events in a regular window, but I can't figure
out how to do it in the Movie View.

Any help would be greatly appreciated. Thanks so much.

--
View this message in context: http://mono.1490590.n4.nabble.com/Disabling-Pause-in-QTMovie-and-detecting-Mouse-Keyboard-events-in-QTMovieView-tp3924550p3924550.html
Sent from the Mono - OSX mailing list archive at Nabble.com.


More information about the Mono-osx mailing list