QuickTime download question

Peter Bogdanoff bogdanoff at me.com
Tue May 22 22:18:53 EDT 2012


Hi,
This is one for QT experts!

I'm using a player to play audio files from a server on the Internet. They are large (symphony movements--30 MB or more) and can take several minutes to download. I'm using QT's fast start to start them playing as soon as possible. They are also interactive in that I allow the user to set the startTime by clicking on a button in a sequence of timed buttons.

The issue is with these larger files. If the user tries to set a startTime beyond what has downloaded so far, the player starts back at zero rather than, say 10000, which the user clicked on. QT fast start isn't true streaming, so you can't jump into the middle of a movie and start playing from there without all of the previous data present.

I have to allow this behavior, but I want to tell the user to wait for the download, and then start automatically playing when the player has downloaded enough data. If the user starts from the beginning it works immediately and the user experience is unchallenged. But if he jumps to the middle, I'm expecting that he will be content to wait for the download to get to that point. (He never sees the QT controller.)

So, I need to know how much data has downloaded so far, so I can either play the thing or wait until enough is in memory, and then start playing. I don't see a property for this. Duration gives me the entire length of the file, including what has now yet downloaded. Size only works for audioClips, which I'm not using.

Is there a way to determine how much data has downloaded of a QT file? 

Incidentally, I tried messing with the load command. What seemed to happen is the player played the fast start movie simultaneously with another process loading the file. The loaded file is unavailable until it completely downloads, so that's no help.

Any help is much appreciated!

Peter
UCLA



More information about the Use-livecode mailing list