Elbert,
Thank you so much. That would make everything so much easier. Will the
player reset to the previous setting when the show is done or do I need to
use the command to reset the previous volume level?
I had another problem. My script kept wanting to restart the feed rather
than just run through the half-hour program. Here is what I have now, any
thoughts?
{ About:
This script will play a remote show inside SAM
The show starts at a specified time, and then ends at
another specified time.
The script also contains some error-correction code
that will attempt to connect to the stream up to 20 times
in case it goes down. We schedule one song between each attempt.
Usage:
a) Comple configuration below and start PAL script.
b) If this show is only in certain days you will need to modify the script
to
only queue the show up during these days.
See the DayOfWeek function.
}
{ CONFIGURATION }
{==================================================}
const ShowURL = 'http://sc8.spacialnet.com:17604/';
const StartTime = '10:00:00';
const EndTime = '10:30:00';
{ IMPLEMENTATION }
{--------------------------------------------------}
var T : Integer;
PAL.Loop := True;
{Wait for the show to start}
PAL.WaitForTime(StartTime);
{Add show to queue}
Queue.Clear;
Queue.AddURL(ShowURL,ipTop);
{Fade to show}
ActivePlayer.FadeToNext;
{Precautions - if there is a brief disconnect or server problem,
then we would want to retry a few times to get back to the show.
To do this we place the URL quite a few times in the queue, followed
by some normal programmming. That way we will try and reconnect until
the end of the show}
T := 0;
while T < 2 do
begin
Queue.AddURL(ShowURL,ipBottom);
CAT['Tracks'].QueueBottom(smLRP,EnforceRules);
T := T + 1;
end;
{Wait for show to end}
PAL.WaitForTime(EndTime);
{Clear queue}
Queue.Clear;
{Fade to normal programming}
ActivePlayer.FadeToNext;
{--------------------------------------------------}