|
Script Control
Muzo provides a public variable that can be accessed from the web page using JavaScript in compatible browsers. This lets you send the URL of an MP3 audio file to Muzo while it's running, either to play immediately or to add to the playlist silently.To use this feature, add the script below to the web page containing Muzo:
<script language="JavaScript"> <!-- function addMuzoTrack(url,info,play) { var s = url + "|" + info + "|" + String(play); if (document.Muzo) document.Muzo.SetVariable("newtrack", s); } // --> </script> Change Muzo to the name used to refer to the applet in your HTML code. When calling this function, you pass in three variables:
1. File URL For example, you could place a link on the page like this:
<a href="javascript:void addMuzoTrack('../tracks/Tequila_Sunrise.mp3', 'A great track by the Eagles.', true)">Tequila Sunrise</a>
Muzo would add this track to the playlist and begin playing it immediately. If you changed the word 'true' to 'false', the track would be added to the playlist and the user could find and select it using the Cue buttons.
|