Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    New Coder
    Join Date
    Jun 2009
    Posts
    63
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Right, well :P....

    If anyone's into a bit of a project...

    I found this on the Apple dev website at http://developer.apple.com/documenta...1526-CH001-SW4

    The browser plug-ins for QuickTime 7.2.1 and later include the ability to emit Document Object Model (DOM) events. DOM events can be emitted when the plug-in is instantiated and ready to interact with JavaScript, at various points during a movie’s loading process, when playback has begun, paused, or ended, or in the event of an error. JavaScript functions can be set to "listen" for particular DOM events. Whenever the DOM event occurs, the listener function is called.

    This allows you to create web pages that detect events such as movie loading, playing, pausing, or ending, without having to create JavaScript timing loops or constantly poll the plug-in for status. It also allows you to execute JavaScript functions in response to various movie events without sending javascript:// URLs from a movie.
    Two of the DOM events emitted by the QT plugin are:
    qt_loadedmetadata — The movie header information has been loaded or created. The duration, dimensions, looping state, and so on are now known.

    qt_load — All media data has been loaded.
    Therefore by registering an event listener:

    Code:
    <script language="javascript" type="text/javascript">
    function myAddListener(obj, evt, handler, captures)
        {
            if ( document.addEventListener )
                obj.addEventListener(evt, handler, captures);
            else
                // IE
                obj.attachEvent('on' + evt, handler);
        }
    </script>
    and writing a function that uses the
    Code:
    string GetUserData('©nam')
    method, (Which returns the movie's name from the user data), it should be possible to write a piece of code that listens for the new movie loading and then returns that movies name, right?

    'Cept, of course, that I'm clueless about how to do that

  2. #17
    Regular Coder ohgod's Avatar
    Join Date
    Jun 2008
    Location
    Ohio
    Posts
    579
    Thanks
    6
    Thanked 69 Times in 69 Posts
    well, you could start by using what prototype has built in :P

    http://prototypejs.org/api/event/observe

  3. #18
    New Coder
    Join Date
    Jun 2009
    Posts
    63
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Ummm... looks like I have some homework ahead


 
Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •