QT player question
Klaus Major
klaus at major-k.de
Mon Apr 4 10:25:28 EDT 2005
Hi Chris,
> Hello all -
>
> I expect this is an easy question, but I can't seem to see how to do
> it! How do I see if a player is playing?
Watch very hard :-)
> The playrate property always returns 1 (I want to play movies at
> normal speed)
The playrate determines the plaback speed of your movie and 0 means
that a playing
movie is currently paused ;-)
> I had thought it might return "0" if the movie was not playing.
> The movie() function only seems to work with video clips, not player
> objects. So I can't say "if the movie is done..."
>
> I need the equivalent of a "playing()" function that would return true
> or false.
Since there is no direct way to dtermine what you want, use a little
trick:
function movie_is_playing
put the currenttime of player xyz into ct
wait 10 millisecs
return (the currenttime fo player xyz < ct)
##will be true if the movie is inded playing, else will be false
end movie_is_playing
Here i just check 2 different "times" and see if they are identical or
not...
Hope that helps...
> A (virtual) Mars bar to the first person with the answer!!!
>
> Chris
Best
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list