Created
April 3, 2018 23:10
-
-
Save djmason9/91e04e4ceec28016e34e9f966abfa59e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var socket = io.connect("http://mydomain.ngrok.io.ngrok.io"); | |
document.addEventListener("DOMContentLoaded", function(event) { | |
var media = document.querySelector('video'); | |
socket.on("doPlayLocal", function (data) { | |
console.log("doPlayLocal called") | |
media.play(); | |
}); | |
socket.on("doStopLocal", function (data) { | |
console.log("doStopLocal called") | |
media.pause(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment