Commit 4f86c854 authored by Mike's avatar Mike

use config to set video host url

parent 0863ab0e
......@@ -29,7 +29,7 @@ exports.createToken = function(id, guestId, sessionId, callback) {
Token.findByDetails(id, guestId, sessionId, function(err, result) {
if (result == null) {
if (err) console.log('Token search failed:',err);
var host = "https://" + controller.ip + ":8080";
var host = (config.mcu.wscert ? "https://" : "http://") + controller.ip + ":" + config.mcu.wsport;
result = new Token({roomId: id, guestId: guestId, host: host, session: sessionId, role: 'guest'});
result.save(function(err, result) {
if (err) console.log("Token update failed");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment