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 CloudAPI.SignedOn()) then
CloudApi.SignIn(username, password, stationId, true);

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

CloudApi.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 (CloudAPI.ActiveLiveSourceId <> CloudAPI.EncoderLiveSourceId) then
   CloudAPI.SwitchNow(CloudAPI.EncoderLiveSourceId);

//Do show for next 60min
PAL.WaitForTime('+01:00:00');
CloudApi.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