Sha256: d0aa3e7e5a92dd44e0264296ad32756e982660ef642efe7a77d0b279ce49eb54
Contents?: true
Size: 861 Bytes
Versions: 5
Compression:
Stored size: 861 Bytes
Contents
var session = OT.initSession(sessionId), publisher = OT.initPublisher("publisher"), archiveID = null; session.connect(apiKey, token, function(err, info) { if(err) { alert(err.message || err); } session.publish(publisher); }); session.on('streamCreated', function(event) { session.subscribe(event.stream, "subscribers", { insertMode: "append" }); }); session.on('archiveStarted', function(event) { archiveID = event.id; console.log("ARCHIVE STARTED"); $(".start").hide(); $(".stop").show(); }); session.on('archiveStopped', function(event) { archiveID = null; console.log("ARCHIVE STOPPED"); $(".start").show(); $(".stop").hide(); }); $(document).ready(function() { $(".start").click(function(event){ $.get("start"); }).show(); $(".stop").click(function(event){ $.get("stop/" + archiveID); }).hide(); });
Version data entries
5 entries across 5 versions & 1 rubygems