Skip to content

Instantly share code, notes, and snippets.

@djmason9
Created April 3, 2018 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djmason9/c63dee85ecc43cd340d2f01add34c8d9 to your computer and use it in GitHub Desktop.
Save djmason9/c63dee85ecc43cd340d2f01add34c8d9 to your computer and use it in GitHub Desktop.
var Arrow = require('arrow');
var io = require('socket.io-client');
var socket = io.connect("http://mydomain.ngrok.io.ngrok.io");
exports.sendPlay = function(id, callback) {
console.log('utils: sendPlay() called');
socket.emit('doPlay',{id : id});
callback({"msg":"Your video is playing."});
};
exports.sendStop = function(id, callback) {
console.log('utils: sendStop() called');
socket.emit('doStop',{id : id});
callback({"msg":"Your video is stopping."});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment