Catch event from QuickTime player

Discussion in 'Mac Programming' started by Sergio10, Oct 4, 2007.

  1. Sergio10 macrumors regular

    Joined:
    Oct 3, 2007
    #1
    Hello!
    I use Carbon API.
    How to implement event catcher? When user drag seek in QuickTime player, I want catch this event and to disable seek. How to do it? Please give me some simple code or link to source. I will happy very much) I already wrote about event manager but not understood about it.
    Please help me.

    P.S. AppleScript is not responsible for this.
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Does the player even send an event? I'd be very surprised. And even if it does I'm 99% sure you will not be able to stop it. The even would be for information only. If you want to effect the player you'd have to embed a Quicktime player/view in your application and act as a delegate (in Cocoa) to influence it.

    If that is what you have done then sorry, but that's not what your post sounds like!
     
  3. Sergio10 thread starter macrumors regular

    Joined:
    Oct 3, 2007
    #3
    I know that Event Manager do it. But I do not know if it hav a influences to QuickTime player.( Maybe it is only for applications which can create and than to catch events from it
     
  4. Nutter macrumors 6502

    Joined:
    Mar 31, 2005
    Location:
    London, England
    #4
    The Event Manager is for processing user events in your application. It can't intercept arbitrary events that occur in other applications.
     
  5. MongoTheGeek macrumors 68040

    MongoTheGeek

    Joined:
    Sep 13, 2003
    Location:
    Its not so much where you are as when you are.
    #5
    The problem is setting up a delegate.

    One thing you can do to partially stop people from scrubbing is

    tell application "QuickTime Player"
    set controller type of document 1 to none
    start document 1
    end tell

    There are still ways around it though. You may have to just bite the bullet and write your own player. In cocoa, it is almost trivial.
     

Share This Page