Playing back remote mp3 files
Scott Rossi
scott at tactilemedia.com
Thu Sep 23 02:56:59 EDT 2004
Recently, Jesse Sng wrote:
> I'm trying to build a standalone browser that will allow the user to
> select from a list of mp3 files and then either stream or download
> them to his hard drive for local playback.
>
> What I'm trying to figure out now is what do I have to do to get the
> QT player to reference a file that's located on a web server? Which
> property do I set to specify that?
The fileName property. This can be set to a file path or a URL.
> Also if I were to download this in the background as a user option,
> do I need to use the libURL functions to bring this down and store it
> myself or can I use the load command to cache this instead?
libURL is one way, via FTP. Another is the "put url..." command:
put url "http://myserver/mytrack.mp3" into url ("binfile:" & myFilePath)
The "binfile" is shorthand for 'binary file' which is needed to tell Rev
what file format you need. Note that both of these options would bring the
file down to the drive, but would not stream playback.
However, by simply setting the player's fileName (and depending on the speed
of your connection) you might be able to begin playback before the file has
completely downloaded.
You should also look at Trevor DeVore's enhanced QuickTime external:
http://www.mangomultimedia.com/developer/revolution/enhancedqt.html
> The reason I'm doing this that I want to have a library of mp3 files
> that are available online but are not accessible via the web browser
> but through our own custom navigation and standalone app. The idea is
> to both simplify the task of navigation and also the task of updating
> that information as I'll probably be working on a tool that will
> allow someone to easily post that information up.
Should be very doable. For a jukebox example (400k) that uses MOV files as
opposed to MP3, enter the following in your message box. Note that this
stack requires the enhanced QT external mentioned above.
go url "http://www.tactilemedia.com/download/jukebox.rev"
Regards,
Scott Rossi
Creative Director
Tactile Media, Development & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com
More information about the use-livecode
mailing list