Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > href in Quicktime

href in Quicktime
Thread Tools
Addicted to MacNN
Join Date: Sep 2000
Status: Offline
Reply With Quote
Jul 3, 2003, 09:01 AM
 
I have a quicktime movie, with a "href=", which launches another movie.

Problem is that the first movie keeps on playing...

As a result, it slows to a crawl, and puts excess drain on the streaming server.



How can it be setup (via <object> and <embed>) so that if a user clicks on a movie, it stops playing, then the href activates?

Perhaps some method of javascript?
I always use protection when fscking my Mac... Do you?
     
Mac Elite
Join Date: Apr 2003
Status: Offline
Reply With Quote
Jul 3, 2003, 10:04 AM
 
maybe javascript that closes the previous window?
Technology, Computing & Creativity - www.clubmedia.com

Overflowing with Design Links - www.mixinvisuals.com

VW Sites.com - Links to the Volkswagen World - www.vwsites.com
     
Addicted to MacNN
Join Date: Sep 2000
Status: Offline
Reply With Quote
Jul 3, 2003, 11:13 AM
 
Originally posted by mixin visuals:
maybe javascript that closes the previous window?
Can't do that. The window is still needed.

The link actually launches an instance of the movie full screen.

So when they are done, they need to go back to that original window for more information.
I always use protection when fscking my Mac... Do you?
     
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
Jul 3, 2003, 11:28 AM
 
well, the good news is there is probably a way to stop the movie via javascript (so clicking on the movie will a) stop it, and b) open another movie full screen)

http://www.apple.com/quicktime/autho...ablejavascript

basicly you need to set the enablejavascript=true argument in you [embed] tag.

I don't know what specific commands you can call from javascript, but there is almost definately a pause command.

http://online.sfsu.edu/~infoarts/tec...avascript.html

says that from javascript you can then call

movname.Stop()

where movname is the name of the embed tag
so you might have something like this:
Code:
[script type='text/javascript' language='javascript'] function launch() { movename.Stop(); window.open("http://myfullscreenwindow.com",windowname,"width=100%, height=100%,toolbar=no,menubar=no,directories=no"); } [/script]
hope that helps

--will
     
Addicted to MacNN
Join Date: Sep 2000
Status: Offline
Reply With Quote
Jul 3, 2003, 01:08 PM
 
Thanks will... that is helpful.

ok, here is what I have (a bit stripped for easy reading).


Code:
[embed src="file.mov" id="movie" href="fullscreen.mov" target="quicktimeplayer" enablejavascript="true"]
(apparantly the board doesn't omit the <embed> tags like I thought it would, hence "<"=="["


That's bascially what I have right now (removed <object>, as well as other garbage, for the sake of making it readable without wasting time.

so how can I employ javascript to this mess?

I understand the little script you wrote... but how can I apply it?

From what I read up on... I need to launch the movie, from within an embed tag, to ensure it's picked up by QT player.


Thanks for your help.



Ironically I found that exact same page earlier.


(ah, 2:00 now... one more hour and work is over for a few days ;-) )

This little task of "the perfect QT video" has been a pain in the butt.

But interesting at the same time.
I always use protection when fscking my Mac... Do you?
     
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
Jul 3, 2003, 01:29 PM
 
can you do something like:
Code:
[script type=text/javascript] function launch() { // with netscape (you'll need to do 2 versions getelementByID('movie').Stop(); // for other browsers document.movie.Stop(); return fullscreen.mov; } [/script] ... [embed src="file.mov" id="movie" href="javascript:launch()" target="quicktimeplayer" enablejavascript="true" target="quicktimeplayer"]
(hopefully what that ends up doing is when the href is executed it goes to the normal place, and stops the movie as it does

--will
     
Addicted to MacNN
Join Date: Sep 2000
Status: Offline
Reply With Quote
Jul 3, 2003, 02:01 PM
 
Thanks...

Will pick up with that 9:00 monday morning.


BBQ here I come!

Happy 4th!
I always use protection when fscking my Mac... Do you?
     
Addicted to MacNN
Join Date: Sep 2000
Status: Offline
Reply With Quote
Jul 7, 2003, 10:14 AM
 
The movie right now plays through an SMIL file.

Is there a way using SMIL to have an option?.
I always use protection when fscking my Mac... Do you?
     
Addicted to MacNN
Join Date: Sep 2000
Status: Offline
Reply With Quote
Jul 7, 2003, 11:14 AM
 
Does quicktime support the sourceplaystate tag? As defined in the SMIL standard?
I always use protection when fscking my Mac... Do you?
     
   
Thread Tools
Forum Links
Forum 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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:46 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2