Waiting until a player is loaded

Sivakatirswami katir at hindu.org
Sun Oct 1 05:45:03 CDT 2006


Oh.. yes,  fun with QuickTime and players...

I'm deep into this myself, with remote URL's, streaming media
-- Windows boulders and sand traps...

Try this -- assumes your screen shot could be one or two frames in --
and -- you are not in a big rush....

untested hack, that avoids trying to
resolve the nagging  "it should work, but doesn't"
from the school of  "WHEW" (WHatEverWorks)

set filename  of player "newPlayer"
start player "newPlayer"
stop player "newPlayer"

# in the player itself.

on playStopped
	# take your screen shot now
	# my goodness, it *must* be rendered  in the
	# VRAM at this point, bien sur! (Mauritian Creole "for sure!)	
end playStopped

aum
skts -- all ears on anything Re-QT players




J. Landman Gay wrote:
> I am trying to load a series of movies into players in a loop, in order 
> to make thumbnails. Inside a repeat loop, I set each player's filename, 
> then take a snapshot of it to get a thumbnail image. This works just 
> fine when I step through it in the debugger.
> 
> However, if I let the loop run at its natural speed, I get a bunch of 
> blank snapshots, either because the content isn't fully loaded before 
> the script continues, or because the screen isn't refreshing (I can't 
> tell which.) I need a way to force the loop to wait until the player is 
> fully loaded, and also something that will refresh the screen so that a 
> snapshot has something to take a picture of.
> 
> I have tried locking and unlocking the screen to force a redraw, tried 
> "go this card" to force a redraw, tried waiting various amounts of time 
> both with and without messages, tried "set the currentTime of player 1 
> to the duration of player 1" to force a full load, and everything else I 
> can think of. In no case does the player content display. I am not sure 
> if this is because the screen simply isn't redrawing (likely), or 
> because the content isn't fully loading before the script continues 
> (possible.)
> 
> Anyone know how to solve this?
> 

-- 
Om shanti
(In  Peace)

Sivakatirswami
www.himalayanacademy.com

Get Hinduism Today Digital Edition. It's Free!
http://www.hinduismtoday.com/digital/




More information about the use-livecode mailing list