Server: Difference between revisions

From kJams Wiki
Jump to navigation Jump to search
No edit summary
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
In the Pro version, and in kJams2, kJams allows the KJ to enable a web server that is built right into kJams, which allows singers to use a web browser (even from a mobile phone) or the [[iJams]] or [[wtkJams]] application to manage their queues.  Basically it will allow singers to log in and manage their "Tonight", "Favorites", and "History" playlists. They can search the Library or any of their singer lists to find songs they can then put into their "Tonight" list. They can reorder their "Tonight" list so the songs come in the order in which they want to sing them.
"'''kJams Pro'''" and "'''kJams 2'''" allow the KJ to enable a '''web server''' that is built into kJams. It allows singers to use the app '''[[kJams Cue]]''' or a web browser to manage their "Tonight", "Favorites", and "History" playlists. Singers can search the KJ's Library, or search any of their playlists to find songs they can then put into their "Tonight" playlist. They can reorder their "Tonight" list so the songs come in the order in which they want to sing them, and they can change the key of any song.


Note: Internet Explorer and Opera are not supported. You must use FireFox, Safari, or, with a little work, Chrome.
Note: Internet Explorer and Opera are not supported. You must use FireFox, Safari, or, with a little work, Chrome.


==Take Note==
==Take Note==
Singers created by the host in kJams (rather than thru the web interface or thru an iPhone) do not have a password. Singers without passwords will NOT show up in the list of singers that can be logged into. To assign a password to a singer so they can log in, in kJams [[Context_Click|context click]] the singer and pick "Get Info", then type a password.
Singers created in the kJams app by the host (rather than thru the web interface or thru '''kJams Cue''') do not have a password. Singers without passwords will NOT show up in the list of singers that can be logged into. To assign a password to a singer so they can log in, in kJams [[Context_Click|context click]] the singer and pick "Get Info", then type a password.


==Playlist used for Server Search==
==Playlist used for Server Search==
By default, the playlist that is searched by the server is the Library. However, the host can change this to any other playlist if desired, by [[Context_Click|context-clicking]] the playlist and choosing "Playlist used for Server Search".
By default, the playlist that is searched by the server is the Library. However, the host can change this to any other playlist if desired, by [[Context_Click|context-clicking]] the playlist and choosing "Playlist used for Server Search".


This is handy if, for example, you have every song in the world in your Library, but only want a subset to be visible for user searches when they use the web server. This setting is remembered per-venue. Only one Playlist may be used for the Server Search.
This is handy if, for example, you have every song in the world in your Library, but only want a subset to be visible for user searches when they use the web server. This setting is remembered per-venue. Only one Playlist may be used for the Server Search.
Line 14: Line 14:


==How To Turn It On==
==How To Turn It On==
# for Windows users only:
## Click the start menu
## Type in "Services"
## Sort by Name
## Scroll down to World Wide Web Publishing Service (W3SVC)
## right click it and pick "Properties"
## if it is running, click "stop"
## in the "startup type" menu, pick "disabled"
## click "Apply"
# run kJams
# To enable existing singers for remote login, right click on each singer and pick "Get info..." and enter a password.
# To enable existing singers for remote login, right click on each singer and pick "Get info..." and enter a password.
# go to "Preferences"
# go to "kJams->Preferences->Server"
# Click "Server"
# Check "Enable kJams Web Server"
# Check "Enable kJams Web Server"
# Keep the default port number (80) unless you're already running a web server. If you are, try 12345 as your port.
# Keep the default port number (80) unless you're already running your own web server. If you are, try 12345 as your port.


==Testing the Web Server==
==Testing the Web Server==
The web server will be on port 80 (or whatever other port you've configured it to) on the IP address which your computer or laptop is set to on the local network, whether wireless (usually) or wired
The web server will be on port 80 (or whatever other port you've configured it to) on the IP address which your computer or laptop is set to on the local network, whether wireless (usually) or wired.
 
To make it easier to find, both for [[wtkJams]] and for users accessing it with a standard web browser on their phone, tablet, or laptop, kJams uses Apple's 'Bonjour' service discovery protocol.  Client-side support for this is built into OS/X on Apple laptops, into iOS on iPhones and iPads, and into Safari for Windows. If your singers are using other browsers on Windows or Linux, including Android phones and tablets, they will have to find the server to log in in other ways, which we'll describe below.


To make it easier to find, both for [[kJams Cue]] and for users accessing it with a standard web browser on their phone, tablet, or laptop, kJams uses Apple's 'Bonjour' service discovery protocol. You will need to install a "Bonjour Browser" to easily find the kJams venue, or you can locate it manually
=== If you're using Windows ===
=== If you're using Windows ===
# Required install [http://support.apple.com/kb/DL999 Bonjour for Windows] (it says "Print Services" but it's the real Bonjour)
# Required install [http://support.apple.com/kb/DL999 Bonjour for Windows] (it says "Print Services" but it's the real Bonjour)
# You *should* install [http://www.apple.com/safari/download/ Safari] or [https://www.mozilla.org/en-US/firefox/new/ FireFox] (All other browsers do not support Bonjour)
# You *may* use FireFox or Chrome, but there is no support for Bonjour (see "No Bonjour?" below)
# Note that "Internet Explorer" is not supported at all.
# Note that "Internet Explorer" is not supported at all.


==== Using Safari? ====
==== Install a Bonjour Browser ====
# Run Safari on any computer on your LAN
Mac: [http://www.tildesoft.com/ Bonjour Browser]<br>
# go to Preferences->Bookmarks, and turn on Bonjour (both "Bookmarks Bar" and "Menu")
Windows: [https://hobbyistsoftware.com/bonjourbrowser Bonjour Browser]
# browse your Bonjour sites for "kJams: <Venue Name>" and pick it! (The default <Venue Name> is "Singers")
# For example if your venue is called "Prancing Pony", then you'll look in safari for "Bookmarks->Bonjour->kJams: Prancing Pony"


==== Using Firefox? ====
=== Locate it Manually ===
# Run Firefox on any computer on your LAN
One option is to run kJams, then go to the Video menu and pick "QR Code-Web Server". This will display a QRCode grid on the Video screen. Have your singer scan that with a QR-Reader app on their smart phone, this will take them right to the your kJams Server.
# install the [https://addons.mozilla.org/en-US/firefox/addon/ciaociao/ Ciaociao extension]
# click the new icon in the icon bar, looks like a little "World"
# browse your Bonjour sites for "kJams: <Venue Name>" and pick it! (The default <Venue Name> is "Singers")
# For example if your venue is called "Prancing Pony", then you'll look in safari for "Bookmarks->Bonjour->kJams: Prancing Pony"
 
==== No Bonjour? ====
One option is to run kJams, then go to the Video menu and pick "QR Code-Web Server". This will display a QRCode grid on the Video screen. Have your singer scan that with a QR-Reader app on their smart phone, this will take them right to the your kJams Server.


Otherwise, you must find out the "sharing name" of your server machine
Otherwise, you must find out the "sharing name" of your server machine
# Mac: in System Preferences->sharing, eg: "bree.local"
# Mac: in System Preferences->sharing, eg: "bree.local"
# Windows:
# Windows:
## start menu->control panels->system->computer name. That plus ".local" is your "sharing name". eg: if your "computer name" is "bree" then your "sharing name" is "bree.local"
## start menu->control panels->system->computer name. That plus ".local" is your "sharing name". eg: if your "computer name" is "bree" then your "sharing name" is "bree.local"
## If the above doesn't work: start->control panels->network and sharing->change adapter settings->double click the LAN adapter->details->IPv4 address: that set of four numbers is your "sharing name", go figure.
## If the above doesn't work: start->control panels->network and sharing->change adapter settings->double click the LAN adapter->details->IPv4 address: that set of four numbers is your "sharing name", go figure.
# to get the full address, you must append ":<port number>" to the sharing name unless it is 80. eg: if your port number is 12345, and your "sharing name" is "bree.local", the full address will be "bree.local:12345". if the port is 80, you do not need to append anything.
# to get the full address, you must append ":<port number>" to the sharing name unless it is 80. eg: if your port number is 12345, and your "sharing name" is "bree.local", the full address will be "bree.local:12345". if the port is 80, you do not need to append anything.
# Go to any computer on your LAN, and in the web browser, enter the full address.
# Go to any computer on your LAN, and in the web browser, enter the full address.


Line 58: Line 55:
[https://karaoke.kjams.com:12345 Click Here] (un: dave, pw: a) to see an example of what the server looks like!
[https://karaoke.kjams.com:12345 Click Here] (un: dave, pw: a) to see an example of what the server looks like!


==If you don't have wireless==
==If you're hyper savvy==
If you are hosting a show in a venue which doesn't have Wifi available to patrons -- don't laugh, there are still a few of those -- you can set up an Ad-Hoc network.
You can put this on a *public* IP address under some domain, and use port 80 (provided there's no other web server on that address). that way people can *from home* enter something like:
 
https://karaoke.kjams.com:12345/
 
and then set up their tonight list, before they even get to the venue!  isn't that spiffy?


# Create a new network<br>https://karaoke.kjams.com/screenshots/server/adhoc/1_create_network.png<br>
The below is FOR EXPERTS ONLY. If you don't understand something, you'll have to seek the advice of someone who knows what they're doing to help you, this is outside the purview of kJams tech support.
# name the network<br>https://karaoke.kjams.com/screenshots/server/adhoc/2_network_name.png<br>
# run kJams
# click on the folder "Singers", this is actually the venue name
# click it again without moving the mouse, this will let you rename the folder
# name the venue<br>https://karaoke.kjams.com/screenshots/server/adhoc/3_venue_name.png<br>
# go to preferences->server
# turn on the server (see above "[[Server#How_To_Turn_It_On|How To Turn it On]]" for more info)<br>https://karaoke.kjams.com/screenshots/server/adhoc/4_turn_on_server.png<br>
# you can set the Port to 80 or just leave it at 80
# if you're using a web browser:
## make sure the web browser computer is on the same network as the kJams computer
## in your web browser, find the kJams Venue name in the Bonjour list (see [[Server#How_To_Turn_It_On|Step 7 Above]]), then click it!  You're in!
# if you're using an iPhone:
## go to Settings->WiFi and pick the Ad-Hoc network.  Note: to pick it, tap the NAME, not the blue arrow on the right.<br>https://karaoke.kjams.com/screenshots/server/adhoc/5_pick_network.PNG<br>
## run [[iJams]] or [[wtkJams]]
## join your venue!  (see links in previous step for examples)  You're in!


==If you're hyper savvy==
# get a domain of your own
You can put this on a *public* IP address under some domain, and use port 80 (provided there's no other web server on that address).  that way people can *from home* enter something like:
# get a public IP address for your server, from your ISP
# set the domain to point to your server
# set your server up to run on said address
# [[Cloning|Clone]] your "kJams" setup from your rig to your server
# run kJams on your server
# set the port to 80


https://karaoke.kjams.com:12345/
Now, when people go to your domain, they'll get to your kJams server!


and then set up their tonight list, before they even get to the venue!  isn't that spiffy?  We will, at some point, have a checklist for how to set this up, including some thoughts on security.
Before your show, quit kJams on the server and copy the "kJams Library" folder to your rig. Run your show. After your show, copy it back and run kJams on the server again.


== Known Issues ==
== Known Issues ==
Line 91: Line 82:


==Updates to the Server Resources==
==Updates to the Server Resources==
The "Server resources" are the HTML, CSS, and Javascript files that make the singer-request webserver work. They live in a the preferences folder for kJams, on your hard drive. When you first run kJams, it copies them to its preferences directory, where kJams will subsequently look for them, so that you can edit them yourself, to do things like insert your show service's logo.
The "Server resources" are the HTML, CSS, and Javascript files that make the singer-request webserver work  They live in a the preferences folder for kJams, on your hard drive. When you first run kJams, it copies them to its preferences directory, where kJams will subsequently look for them, so that you can edit them yourself, to do things like insert your show service's logo.


When there is an update to the server resources, kJams will ask you if you'd like to automatically update them.
When there is an update to the server resources, kJams will ask you if you'd like to automatically update them.


Warning: If you HAVE made changes to them, you have to [[Server/Update|manually update]] these files, otherwise you can just click "Update" when it asks.
Warning: If you HAVE made changes to them, you have to [[Server/Update|manually update]] these files, otherwise you can just click "Update" when it asks.

Latest revision as of 16:26, 3 May 2022

"kJams Pro" and "kJams 2" allow the KJ to enable a web server that is built into kJams. It allows singers to use the app kJams Cue or a web browser to manage their "Tonight", "Favorites", and "History" playlists. Singers can search the KJ's Library, or search any of their playlists to find songs they can then put into their "Tonight" playlist. They can reorder their "Tonight" list so the songs come in the order in which they want to sing them, and they can change the key of any song.

Note: Internet Explorer and Opera are not supported. You must use FireFox, Safari, or, with a little work, Chrome.

Take Note

Singers created in the kJams app by the host (rather than thru the web interface or thru kJams Cue) do not have a password. Singers without passwords will NOT show up in the list of singers that can be logged into. To assign a password to a singer so they can log in, in kJams context click the singer and pick "Get Info", then type a password.

Playlist used for Server Search

By default, the playlist that is searched by the server is the Library. However, the host can change this to any other playlist if desired, by context-clicking the playlist and choosing "Playlist used for Server Search".

This is handy if, for example, you have every song in the world in your Library, but only want a subset to be visible for user searches when they use the web server. This setting is remembered per-venue. Only one Playlist may be used for the Server Search.

This also has the benefit of moving the playlist to the top area of the Source list, above the venue, so you can get to it easily without having to scroll down below the singers to find it.

How To Turn It On

  1. for Windows users only:
    1. Click the start menu
    2. Type in "Services"
    3. Sort by Name
    4. Scroll down to World Wide Web Publishing Service (W3SVC)
    5. right click it and pick "Properties"
    6. if it is running, click "stop"
    7. in the "startup type" menu, pick "disabled"
    8. click "Apply"
  2. run kJams
  3. To enable existing singers for remote login, right click on each singer and pick "Get info..." and enter a password.
  4. go to "kJams->Preferences->Server"
  5. Check "Enable kJams Web Server"
  6. Keep the default port number (80) unless you're already running your own web server. If you are, try 12345 as your port.

Testing the Web Server

The web server will be on port 80 (or whatever other port you've configured it to) on the IP address which your computer or laptop is set to on the local network, whether wireless (usually) or wired.

To make it easier to find, both for kJams Cue and for users accessing it with a standard web browser on their phone, tablet, or laptop, kJams uses Apple's 'Bonjour' service discovery protocol. You will need to install a "Bonjour Browser" to easily find the kJams venue, or you can locate it manually

If you're using Windows

  1. Required install Bonjour for Windows (it says "Print Services" but it's the real Bonjour)
  2. Note that "Internet Explorer" is not supported at all.

Install a Bonjour Browser

Mac: Bonjour Browser
Windows: Bonjour Browser

Locate it Manually

One option is to run kJams, then go to the Video menu and pick "QR Code-Web Server". This will display a QRCode grid on the Video screen. Have your singer scan that with a QR-Reader app on their smart phone, this will take them right to the your kJams Server.

Otherwise, you must find out the "sharing name" of your server machine

  1. Mac: in System Preferences->sharing, eg: "bree.local"
  2. Windows:
    1. start menu->control panels->system->computer name. That plus ".local" is your "sharing name". eg: if your "computer name" is "bree" then your "sharing name" is "bree.local"
    2. If the above doesn't work: start->control panels->network and sharing->change adapter settings->double click the LAN adapter->details->IPv4 address: that set of four numbers is your "sharing name", go figure.
  3. to get the full address, you must append ":<port number>" to the sharing name unless it is 80. eg: if your port number is 12345, and your "sharing name" is "bree.local", the full address will be "bree.local:12345". if the port is 80, you do not need to append anything.
  4. Go to any computer on your LAN, and in the web browser, enter the full address.

Example Server

Click Here (un: dave, pw: a) to see an example of what the server looks like!

If you're hyper savvy

You can put this on a *public* IP address under some domain, and use port 80 (provided there's no other web server on that address). that way people can *from home* enter something like:

https://karaoke.kjams.com:12345/

and then set up their tonight list, before they even get to the venue! isn't that spiffy?

The below is FOR EXPERTS ONLY. If you don't understand something, you'll have to seek the advice of someone who knows what they're doing to help you, this is outside the purview of kJams tech support.

  1. get a domain of your own
  2. get a public IP address for your server, from your ISP
  3. set the domain to point to your server
  4. set your server up to run on said address
  5. Clone your "kJams" setup from your rig to your server
  6. run kJams on your server
  7. set the port to 80

Now, when people go to your domain, they'll get to your kJams server!

Before your show, quit kJams on the server and copy the "kJams Library" folder to your rig. Run your show. After your show, copy it back and run kJams on the server again.

Known Issues

  • A search that returns more than 200 songs will say "too many hits, refine your search" or something like that. ("200" is the default, but you can change it in the prefs "maximum number of songs returned in web server search")
  • A failed login (i.e., bad password) will not display an error; it will just display the login page again.
  • Updates made in kJams (eg: song added or list reordered) don't show up in the web UI unless the playlist is refreshed

Updates to the Server Resources

The "Server resources" are the HTML, CSS, and Javascript files that make the singer-request webserver work They live in a the preferences folder for kJams, on your hard drive. When you first run kJams, it copies them to its preferences directory, where kJams will subsequently look for them, so that you can edit them yourself, to do things like insert your show service's logo.

When there is an update to the server resources, kJams will ask you if you'd like to automatically update them.

Warning: If you HAVE made changes to them, you have to manually update these files, otherwise you can just click "Update" when it asks.

Code

if you're a code monkey and stuff you can look here