Skip to Content
It is currently December 9th, 2023, 7:15 am

All times are UTC - 6 hours [ DST ]




 [ 6 posts ] 
Author Message
 Post subject: remote dj?
PostPosted: May 2nd, 2010, 9:14 am 
Offline
New User
New User

Joined: May 2nd, 2010, 8:59 am
Posts: 6
Hey,


One idea is a remote dj part to sam broadcaster. E.g.
There is the computer back at the office, which deals with streaming, then there is a computer at the party place which deals with the dj. Just login with a ip address, username, password and your ready to remotely control the computer back at the office (But only control sam).

Thanks,

_________________
Thanks,

Kurt.

For legendary web hosting, go to http://www.webbithoster.com/.
If you provide me with nice comments, I can get wholesale prices websites for you.


Top
 Profile  
 
 Post subject: Re: remote dj?
PostPosted: May 2nd, 2010, 9:41 am 
Offline
Alumni
Alumni

Joined: December 20th, 2006, 9:23 pm
Posts: 12211
Location: Show Low, AZ
This can already be done with one of countless Remote Desktop Applications.

_________________
Andrew Cannon
(SVS) Spacial Volunteer Support

WE DANCE AS ONE: A Celebration In Groove
All That Is GOOD In Dance Music from the
70's, 80's, 90's and Now... plus some of the
best DJs from around the world.
http://www.wda1.com


Top
 Profile  
 
 Post subject: Re: remote dj?
PostPosted: May 2nd, 2010, 7:33 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
Create a user with no admin privs and SAM as the only app.

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
 
 Post subject: Re: remote dj?
PostPosted: July 2nd, 2021, 3:35 pm 
Offline
New User
New User

Joined: July 2nd, 2021, 1:15 am
Posts: 1
In 2021 - Can Sam Players be Event Schedule programmed to stop music and start music at certain times for a remote DJ' scheduled times, or does the remote DJ have to physically be given access to Sam Broadcasting Computer (via Remote Desktop Applications)?


Top
 Profile  
 
 Post subject: Re: remote dj?
PostPosted: July 5th, 2021, 5:50 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
You can schedule a PAL script which will do that for you.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

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


Top
 Profile  
 
 Post subject: Re: remote dj?
PostPosted: July 19th, 2021, 6:19 pm 
Offline
Junior User
Junior User

Joined: June 4th, 2017, 12:15 pm
Posts: 27
This is a couple of weeks after the last post here - but I can offer a different solution to allowing your remote DJs access to stop and start the encoders on the main broadcast server.

This assumes that you have some sort of web space for your station, and are using a MySQL database. If you're using Firebird, you can probably still do it. Just please don't ask me how.

On a different station for which I used to work, the owner/creator of the station wanted to have the remote DJs able to stop the server encoders for long enough that they could connect to the server with their own personal version of SAM, then do their show. After it was over, they would simply drop their connection and the "central" server would pick up within a second or two. How he did it:

- Added a new table to the samdb database called 'encoders'
- Added a column to that table called 'updown' - a numeric/boolean field that will take only 0 or 1 values
- Created a PAL script that ran all the time that looked like this:

(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
PAL.Loop := TRUE;

PAL.LockExecution;

var result, pstatus : Integer;
var D : TDataSet;
var enc : String;
var resetQuery : String;

resetQuery := 'UPDATE encoders set encode=0';

// use SQL query to check encode=1 or 0, which will be acted on later
// if encode=2, stop all encoders, then wait for one minute and start them again

D := Query('SELECT encode from encoders', [], True);
result := D['encode'];
enc := IntToStr(result);

IF (enc = '2') then
    // WriteLn('Encoders would be stopped here');
      // Player.FadeToNext;
      Encoders.StopAll();

IF (enc = '1') then
    // WriteLn('Encoder 1 would be started here');
      Encoders[0].Start();
      
IF (enc = '1') then
    // WriteLn('Encoder 2 would be started here');
      Encoders[1].Start();         
   
IF ((enc = '2') OR (enc = '1')) then
    PAL.WaitForTime('+00:01:00');

IF (enc = '2') then
    // WriteLn('Encoder 1 would be started here');
      Encoders[0].Start();
IF (enc = '2') then
    // WriteLn('Encoder 2 would be started here');
      Encoders[1].Start();   
   
// reset encode back to 0
IF ((enc = '2') OR (enc = '1')) then
    ExecSQL(resetQuery, []);

PAL.UnlockExecution;


(I left all of his comments, debug hooks, etc. intact)

- Next, he created a very simple PHP page containing two radio buttons: to shut off, or start the encoders. It should be OBVIOUS, but definitely put this page behind a VERY strong password to keep assholes from getting at it.

When shut off was clicked, it flipped the 'updown' value to 1 from the usual 0 - for 60 seconds. It would take far less time than that for the live DJ to connect their own encoders to the server. After a minute, the 'updown' value was flipped back, and the encoders on the main server would continue to try to connect until the live DJ's show was over and they dropped their connection - at which time the main server would pick right back up. Here is the PHP code for that:

(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
<?php

include "../connect.sql.php";

//AFTER THE FORM HAS BEEN SUBMITTED

$stage = $_GET['stage'];
if($stage == "2")
{
$encode = $_POST['encode'];
}
if($encode == "1") {
echo "Encoders started.";

$query = "UPDATE encoders SET encode =$encode";
$result = mysql_query($query);

}
if($encode == "2") {
echo'
Encoders stopped!<br>
There is no need to go back and restart the encoders, as they will restart themselves in 60 seconds.<br>
';

$query = "UPDATE encoders SET encode =$encode";
$result = mysql_query($query);
$enrquery = "UPDATE encoders SET reqform=1";
$res2 = mysql_query($enrquery);

}
else {
//THE FORM!
echo'
<form method=post action="encoders.php?stage=2">
<B>Start and Stop Certain Encoders...</B><br />

<input type="radio" value="1" name="encode">Start All Encoders<br>

<input type="radio" value="2" name="encode">Stop All Encoders<br>

<input type=submit value="<< Proceed >>"></form>';
};

?>


I hope this is clear enough for those of you who grok this sort of thing better than I. I didn't know what Meatwad from HCR was talking about half the time, I just nodded my head and said 'uh huh'. :)

_________________
Cygnus
Owner/On-air host, Unhinged


Top
 Profile  
 
Display posts from previous:  Sort by  
 [ 6 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 6 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