Is there any provision to change the DEFAULT NAMES in TogetherJS? I have seen the DEFAULT NAMES in peers.js.
Asked
Active
Viewed 442 times
1 Answers
1
In the open source project they are located in the locale
files. and compiled into the js
file.
You can return your own by creating a script prior to the TogetherJS script file. Works great if you have your own Identity Server.
<script>
TogetherJSConfig_getUserName = function () {return 'User Name';};
</script>
<script src="https://togetherjs.com/togetherjs-min.js"></script>
You can also create your own random creator simple enough.
Example Fiddle
<script>
pickRandom = function (array) {
return array[Math.floor(Math.random() * array.length)];
};
var DEFAULT_NICKNAMES = [
"Mickey Mouse",
"Donald Duck",
"Snow White",
"Sir Goofey",
"Prince Charming"
];
TogetherJSConfig_getUserName = function () {return pickRandom(DEFAULT_NICKNAMES);};
</script>
<script src="https://togetherjs.com/togetherjs-min.js"></script>
Link to Documents of other settings

talves
- 13,993
- 5
- 40
- 63
-
Programming audio chat, not yet. – talves Mar 20 '15 at 08:27