Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-23-2009, 03:54 PM   PM User | #16
piers
New Coder

 
Join Date: Jun 2009
Posts: 63
Thanks: 8
Thanked 0 Times in 0 Posts
piers is an unknown quantity at this point
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

Quote:
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:
Quote:
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
piers is offline   Reply With Quote
Old 06-24-2009, 02:44 PM   PM User | #17
ohgod
Regular Coder

 
ohgod's Avatar
 
Join Date: Jun 2008
Location: Ohio
Posts: 579
Thanks: 6
Thanked 69 Times in 69 Posts
ohgod is on a distinguished road
well, you could start by using what prototype has built in :P

http://prototypejs.org/api/event/observe
ohgod is offline   Reply With Quote
Old 06-25-2009, 03:04 AM   PM User | #18
piers
New Coder

 
Join Date: Jun 2009
Posts: 63
Thanks: 8
Thanked 0 Times in 0 Posts
piers is an unknown quantity at this point
Ummm... looks like I have some homework ahead
piers is offline   Reply With Quote
Reply

Bookmarks

Tags
conflict, javascript, prototype, uize

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:28 AM.


Advertisement
Log in to turn off these ads.