Update README; add LICENSE

This commit is contained in:
calzoneman 2013-02-16 11:19:59 -06:00
parent 68fc74edd5
commit e902a8074a
15 changed files with 153 additions and 3 deletions

BIN
.header.js.swp Normal file

Binary file not shown.

BIN
.server.js.swp Normal file

Binary file not shown.

14
LICENSE Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,52 @@
I promise to actually document this at some point.
calzoneman/sync
===============
If you want to try it, edit settings in config.js and update
`IO_URL` in www/assets/js/client.js
About
-----
Sync is a server/client combination I wrote to synchronize media playback
among clients. It's inspired by Synchtube, but I wanted to make the
interface simpler, add a searchable library for each channel, and it's just
a fun challenge.
The serverside is written in JavaScript and runs on Node.JS. It makes use
of a MySQL database to store user registrations, cached media metadata, and
data about each channel.
The clientside is written in JavaScript and makes use of Socket.IO and
jQuery. The web interface uses Bootstrap for layout and styling.
Sync currently supports YouTube, Soundcloud, Vimeo, and TwitchTV.
Installing
----------
This assumes you have Node.JS installed.
I'm using v0.8.20, please feel free to report which versions do/do not work
1. Clone this repository
2. `cd` to the directory containing the source files
3. Install socket.io: `npm install socket.io`
4. Install connect: `npm install connect`
5. Install your distribution's `libmysqlclient` package
6. Install the libmysql node module: `npm install mysql-libmysqlclient`
7. Edit `config.js` and input your database details and connection port
8. Edit `www/assets/js/client.js` and change the value of `IO_URL` to `yourhostname:port` where `port` is the port defined in `config.js`
Running
-------
Start the server: `node server.js`
You should now be able to connect via `yourhostname:port` where `port` is
the port you defined in config.js
Feedback
--------
Please open a GitHub Issue.
License
-------
[Licensed under Creative Commons Attribution-NonCommercial 3.0](http://creativecommons.org/licenses/by-nc/3.0/)
See LICENSE for the full license text

View File

@ -1,3 +1,11 @@
/**
* Copyright 2013 Calvin 'calzoneman' Montgomery
*
* Licensed under Creative Commons Attribution-NonCommercial 3.0
* See http://creativecommons.org/licenses/by-nc/3.0/
*
*/
var mysql = require('mysql-libmysqlclient');
var Config = require('./config.js');

View File

@ -1,3 +1,11 @@
/**
* Copyright 2013 Calvin 'calzoneman' Montgomery
*
* Licensed under Creative Commons Attribution-NonCommercial 3.0
* See http://creativecommons.org/licenses/by-nc/3.0/
*
*/
var mysql = require('mysql-libmysqlclient');
var Config = require('./config.js');
var Rank = require('./rank.js');

View File

@ -1,3 +1,11 @@
/**
* Copyright 2013 Calvin 'calzoneman' Montgomery
*
* Licensed under Creative Commons Attribution-NonCommercial 3.0
* See http://creativecommons.org/licenses/by-nc/3.0/
*
*/
exports.MYSQL_SERVER = '';
exports.MYSQL_DB = '';
exports.MYSQL_USER = '';

View File

@ -1,3 +1,11 @@
/**
* Copyright 2013 Calvin 'calzoneman' Montgomery
*
* Licensed under Creative Commons Attribution-NonCommercial 3.0
* See http://creativecommons.org/licenses/by-nc/3.0/
*
*/
var http = require('http');
// Helper function for making an HTTP request and getting the result

View File

@ -1,3 +1,11 @@
/**
* Copyright 2013 Calvin 'calzoneman' Montgomery
*
* Licensed under Creative Commons Attribution-NonCommercial 3.0
* See http://creativecommons.org/licenses/by-nc/3.0/
*
*/
// Helper function for formatting a time value in seconds
// to the format hh:mm:ss
function formatTime(sec) {

View File

@ -1,3 +1,11 @@
/**
* Copyright 2013 Calvin 'calzoneman' Montgomery
*
* Licensed under Creative Commons Attribution-NonCommercial 3.0
* See http://creativecommons.org/licenses/by-nc/3.0/
*
*/
exports.Guest = 0;
exports.Member = 1;
exports.Moderator = 4;

View File

@ -1,3 +1,11 @@
/**
* Copyright 2013 Calvin 'calzoneman' Montgomery
*
* Licensed under Creative Commons Attribution-NonCommercial 3.0
* See http://creativecommons.org/licenses/by-nc/3.0/
*
*/
var User = require('./user.js').User;
var Config = require('./config.js');
var connect = require('connect');

View File

@ -1,3 +1,11 @@
/**
* Copyright 2013 Calvin 'calzoneman' Montgomery
*
* Licensed under Creative Commons Attribution-NonCommercial 3.0
* See http://creativecommons.org/licenses/by-nc/3.0/
*
*/
var Rank = require('./rank.js');
var Auth = require('./auth.js');
var Channel = require('./channel.js').Channel;

View File

@ -1,3 +1,11 @@
/**
* Copyright 2013 Calvin 'calzoneman' Montgomery
*
* Licensed under Creative Commons Attribution-NonCommercial 3.0
* See http://creativecommons.org/licenses/by-nc/3.0/
*
*/
// Wrapped in a function so I can ensure that the socket
// is defined before these statements are run
function initCallbacks() {

View File

@ -1,3 +1,11 @@
/**
* Copyright 2013 Calvin 'calzoneman' Montgomery
*
* Licensed under Creative Commons Attribution-NonCommercial 3.0
* See http://creativecommons.org/licenses/by-nc/3.0/
*
*/
const IO_URL = "http://somewebsite:1337";
const SYNC_THRESHOLD = 2;
var LEADER = false;

View File

@ -1,3 +1,11 @@
/**
* Copyright 2013 Calvin 'calzoneman' Montgomery
*
* Licensed under Creative Commons Attribution-NonCommercial 3.0
* See http://creativecommons.org/licenses/by-nc/3.0/
*
*/
// Adds a user to the chatbox userlist
function addUser(name, rank, leader) {
var div = document.createElement('div');