Follow

PAL Script - SAM Broadcaster Cloud Live Show (this script is included in SAM Broadcaster)

const username : string = 'example@spacial.com';        // Replace with the DJ's email address
const password : string = 'changeme';                   // Replace with the DJ's password
const stationId : integer = 123;                        // Replace with the Station ID Number

PAL.WaitForTime('13:00:00'); //Show starts at 1pm

if(not SamVibeAPI.SignedOn()) then
 SamVibeApi.SignIn(username, password, stationId, true);

//Only OWNER of station can change broadcast mode!
if(SamVibeAPI.BroadcastMode <> bmLiveCloudBackup) then
  SamVibeApi.ChangeBroadcastMode(bmLiveCloudBackup);

SamVibeApi.StartEncoder;

{TODO: Here is where you would
  a) Clear the queue
  b) Start the Player decks if needed
  c) etc
}

//Wait for stream to buffer
PAL.WaitForTime('+00:00:30');

//Check if we are on-air source. If not, switch to us immediately
if (SamVibeAPI.ActiveLiveSourceId <> SamVibeAPI.EncoderLiveSourceId) then
   SamVibeAPI.SwitchNow(SamVibeAPI.EncoderLiveSourceId);

//Do show for next 60min
PAL.WaitForTime('+01:00:00');
SamVibeApi.StopEncoder;

//Wait for next day
PAL.WaitForTime('23:59:59');
PAL.Loop := True; //Restart script

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments