Skip to Content
It is currently July 17th, 2019, 10:10 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: January 15th, 2019, 7:55 pm 
Offline
New User
New User

Joined: January 15th, 2019, 7:32 pm
Posts: 7
Location: Padang, Indonesia
Hello friends,

I run an FM Radio Broadcast Station 24x7. I need a help how to write a PAL Script or do it with ES if I want to relay another live streaming station at a certain time automatically ?

ex: I want to command SAM Player to fade and stop at 07:00 am and automatically switch it to relay another livestream radio station from www.xxxxxxx.com (URL address). 08:00 am the relay will fade and stop and the player start again playing the songs in queue list.

Thank you


Top
 Profile  
Reply with quote  
PostPosted: January 16th, 2019, 6:23 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7860
Location: Aachen (Germany)
Relaying from within SAM? (i.e.: add URL to player)
Use the Event scheduler to add the URL to a player using the "Add Files to Queue" section and when it's supposed to end, just run another "Add Files to Queue" Event with ActivePlayer.FadeToNext;
Add to queue events are basically just PAL scripts and you can run (almost) all PAL commands inside.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: January 19th, 2019, 2:45 am 
Offline
New User
New User

Joined: January 15th, 2019, 7:32 pm
Posts: 7
Location: Padang, Indonesia
Thank you Herr Bauer,

Yes, relaying within SAM. So, pls correct me if I am wrong. i.e : Let say now the player is running in loop mode and I want to relay another station from a website. Then I use ES to add URL Player and set the time to Start. At this stage should I stop the active player ? if Yes, what is the command / how to do that.

When the relay time is finished, what should I do to stop the relay and activate again the songs in queue.

Would you mind please to be more in detail explanation. Vielen Dank..


Top
 Profile  
Reply with quote  
PostPosted: January 21st, 2019, 3:09 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7860
Location: Aachen (Germany)
Use
Code:
ActivePlayer.Next;

or
Code:
ActivePlayer.FadeToNext;


That will stop the current player (and empty it) and continue with what's on top of the Queue / whatever is loaded and not playing on the other player deck.

So the full commands for starting a URL using event scheduler would look like this:
Code:
Queue.AddUrl('http://127.0.0.1:8000/1', ipTop);
ActivePlayer.FadeToNext;


Once it's time to finish the relay, just use the same ActivePlayer command (obviously without queueing the URL again before):
Code:
ActivePlayer.FadeToNext;

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: January 23rd, 2019, 2:44 am 
Offline
New User
New User

Joined: January 15th, 2019, 7:32 pm
Posts: 7
Location: Padang, Indonesia
Thank you very much.... simple commands but work well.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group