mongo #Users { _id: 'user_id', name: 'name', group: ['group_id', 'group_id'], // or null if not part of any group role: 'role_id' }
mongo #Groups {
| { | |
| "normal" : { | |
| "rtmp_url" : "rtmp://s3nk7dw67yrgbd.cloudfront.net/uploads/videos/544e6be461706912a31c0000/normal.mp4", | |
| "height" : 720, | |
| "resolution" : "1280x720", | |
| "width" : 1280, | |
| "size" : 3702226, | |
| "origin_url" : "http://showbox-env-prod1-media-items.s3.amazonaws.com/uploads/videos/544e6be461706912a31c0000/normal.mp4", | |
| "state" : "ready", | |
| "url" : "https://d1hlu1y29anwda.cloudfront.net/uploads/videos/544e6be461706912a31c0000/normal.mp4" |
mongo #Users { _id: 'user_id', name: 'name', group: ['group_id', 'group_id'], // or null if not part of any group role: 'role_id' }
mongo #Groups {
| #!/bin/bash | |
| echo "Select on option:" | |
| echo "1) Set up new PoPToP server AND create one user" | |
| echo "2) Create additional users" | |
| read x | |
| if test $x -eq 1; then | |
| echo "Enter username that you want to create (eg. client1 or john):" | |
| read u | |
| echo "Specify password that you want the server to use:" | |
| read p |
| #!/bin/bash | |
| echo "Select on option:" | |
| echo "1) Set up new PoPToP server AND create one user" | |
| echo "2) Create additional users" | |
| read x | |
| if test $x -eq 1; then | |
| echo "Enter username that you want to create (eg. client1 or john):" | |
| read u | |
| echo "Specify password that you want the server to use:" | |
| read p |
| var events = require('events'); | |
| var Events = new events.EventEmitter; | |
| var redis = require('redis'); | |
| var store = redis.createClient(6379, 'localhost'); | |
| var pub = redis.createClient(6379, 'localhost'); | |
| var sub = redis.createClient(6379, 'localhost'); | |
| sub.setMaxListeners(0); | |
| sub.subscribed = false; |
| sub.on('subscribe', function(channel){ | |
| console.log('SUBSCRIBED TO CH: ' + channel); | |
| Events.emit('subscribed:' + num, channel); | |
| }); | |
| sub.on('message', function(chanel, message){ | |
| console.log('ONMESSAGE FROM CH: ' + chanel + ' with message ' + message); | |
| }); | |
| sub.subscribe('msg:' + num); |
| sub.on('subscribe', function(channel){ | |
| console.log('SUBSCRIBED TO CH: ' + channel); | |
| Events.emit('subscribed:' + num, channel); | |
| }); | |
| sub.on('message', function(chanel, message){ | |
| console.log('ONMESSAGE FROM CH: ' + chanel + ' with message ' + message); | |
| }); | |
| sub.subscribe('msg:' + num); |
| var _ = require('lodash'), | |
| users = require('../routes/user2'), | |
| assets = require('../routes/assets'), | |
| openTok = require('./opentok.wrapper'), | |
| appEvents = require('./app_events'), | |
| io = null, | |
| rooms = {}; | |
| module.exports = { |
| var wizard = new GenericWizard({ | |
| views: { | |
| 1: { | |
| title: 'Some Title', | |
| htmlView: 'html DOM here', | |
| bbView: 'backbone view here optional' | |
| }, | |
| 2: { | |
| title: 'Some Title', | |
| htmlView: 'html DOM here', |
| var _mergeChunks = function(id, chunksArr, callback){ | |
| var exec = require('child_process').exec, | |
| tmpDir = config.getUploadPath(), | |
| fileHash = crypto.createHash('md5').update(id + moment().unix()).digest('hex'), | |
| txtFile = 'concat_' + fileHash + '_' + id + '.txt', | |
| videoOut = 'concat_' + fileHash + '_' + id + '.mp4', | |
| stream = fs.createWriteStream(tmpDir + '/' + txtFile), | |
| cmd; | |
| stream.once('open', function(fd) { |