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.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript & Quicktime Problem

    Hi,

    I'm very much a newbie to javascript, I do a lot of php and need now a bit of javascript to control a narration on a website which is run as an mp3 thru the quicktime plug-in. The plug-in is working fine and I've written javascript to pause and play the narration through the pages own button.

    The next task was to get it to move to the next slide after the narration has finished, so I decided to do a javascript re-direct after the time returned by the int GetDuration() command which the apple site says returns the length of the movie. (developer.apple.com...atsNew-74.html)

    However, it doesn't work, and IE keeps telling me "'redirTime' is undefined". The script is below, as is the embed tag for the movie.

    Code:
    <script language="javascript">
    <!--
    redirTime = document.narration.GetDuration()*1000;
    redirURL = "slides.php?slide=<?php echo $nextslide; ?>";
    function redirTimer() { 
    	self.setTimeout("self.location.href = redirURL;",redirTime); 
    	}
    //-->
    </script>
    Code:
    <body onLoad="redirTimer()">
    <OBJECT classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="1" height="1" id="narration">
    <PARAM name="src" value="<?php echo $narrationpath; ?>"><EMBED width="1" height="1" src="<?php echo $narrationpath; ?>" name="narration" loop="false" enablejavascript="true" />
    </OBJECT>
    I'm sure there's just some OOP thing i'm missing regarding variable names or something, as I said, javascript newbie! Thanks in advance for any help.

    Paddy.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I don't have quicktime but I'm pretty sure javascript isn't needed for what you want to do. Just make an m3u playlist. Read this post on how to do that. http://www.codingforums.com/showpost...8&postcount=36
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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