Skip to content

Commit

Permalink
Fix empty room-id bug
Browse files Browse the repository at this point in the history
  • Loading branch information
luvolondon authored Apr 13, 2020
1 parent 30c63bd commit 3860e72
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions jitsirtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ Hooks.on("init", function() {

Hooks.on("setup", function() {


WebRTC.prototype.initialize = async function () {
return true;
};
Expand Down Expand Up @@ -699,6 +700,12 @@ Hooks.on("setup", function() {
Hooks.on("ready", function() {

game.webrtc = new JitsiWebRTC(new WebRTCSettings());

let roomid = game.webrtc.settings.getWorldSetting("server.room");
if ( roomid == "" ) {
roomid = "fvtt" + (10000000 + Math.floor((Math.random() * 10000000) + 1));
game.webrtc.settings.setWorldSetting("server.room",roomid);
}
game.webrtc.initialize();

});
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"title": "Jitsi WebRTC client",
"description": "Use Jitsi to handle A/V. Connect to jitsi.org or self-hosted server.",
"author": "Luvolondon",
"version": "0.2.2",
"version": "0.2.3",
"styles": [],
"packs": [],
"url": "https://github.com/luvolondon/fvtt-module-jitsiwebrtc",
"manifest": "https://raw.githubusercontent.com/luvolondon/fvtt-module-jitsiwebrtc/master/module.json",
"download": "https://github.com/luvolondon/fvtt-module-jitsiwebrtc/archive/v0.2.2.zip",
"download": "https://github.com/luvolondon/fvtt-module-jitsiwebrtc/archive/v0.2.3.zip",
"minimumCoreVersion": "0.5.3",
"scripts": ["jitsirtc.js","lib-jitsi-meet.min.js"]
}

0 comments on commit 3860e72

Please sign in to comment.