mirror of https://github.com/calzoneman/sync.git
Update README; add LICENSE
This commit is contained in:
parent
68fc74edd5
commit
e902a8074a
Binary file not shown.
Binary file not shown.
54
README.md
54
README.md
|
@ -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
|
||||
|
|
8
auth.js
8
auth.js
|
@ -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');
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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 = '';
|
||||
|
|
|
@ -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
|
||||
|
|
8
media.js
8
media.js
|
@ -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) {
|
||||
|
|
8
rank.js
8
rank.js
|
@ -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;
|
||||
|
|
|
@ -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');
|
||||
|
|
8
user.js
8
user.js
|
@ -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;
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue