|
|
@ -27,7 +27,7 @@ define([], function() { |
|
|
|
|
|
|
|
|
|
|
|
$scope.withUsersForget = true; |
|
|
|
$scope.withUsersForget = true; |
|
|
|
|
|
|
|
|
|
|
|
this.registerUserid = function(btn) { |
|
|
|
this.registerUserid = function(event) { |
|
|
|
|
|
|
|
|
|
|
|
var successHandler = function(data) { |
|
|
|
var successHandler = function(data) { |
|
|
|
console.info("Created new userid:", data.userid); |
|
|
|
console.info("Created new userid:", data.userid); |
|
|
@ -40,8 +40,13 @@ define([], function() { |
|
|
|
delete data.nonce; |
|
|
|
delete data.nonce; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var form = null; |
|
|
|
|
|
|
|
if (event && event.target) { |
|
|
|
|
|
|
|
form = event.target.form; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
console.log("No userid - creating one ..."); |
|
|
|
console.log("No userid - creating one ..."); |
|
|
|
mediaStream.users.register(btn.form, function(data) { |
|
|
|
mediaStream.users.register(form, function(data) { |
|
|
|
if (data.nonce) { |
|
|
|
if (data.nonce) { |
|
|
|
successHandler(data); |
|
|
|
successHandler(data); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|