├── .gitignore ├── README.md ├── style.css ├── LICENSE ├── jitsi_url_generator.js ├── index.html └── roomname_generator.js /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # jitsi-url-generator 2 | 3 | See: https://shawnchin.github.io/jitsi-url-generator/ 4 | 5 | A simple UI that allows you to make simple customisations and watch how the URL changes. 6 | It only exposes a small fraction of what is possible with Jitsi, but should hopefully help build familiarity which 7 | users can then apply to other config values in the whitelist. 8 | 9 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | .divider { 2 | height: 2rem; 3 | background-color: rgba(0, 0, 0, .1); 4 | border: solid rgba(0, 0, 0, .15); 5 | border-width: 1px 0; 6 | box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15); 7 | } 8 | 9 | @media (min-width: 992px) { 10 | .rounded-lg-3 { 11 | border-radius: .3rem; 12 | } 13 | } 14 | 15 | #monster { 16 | cursor: pointer; 17 | } 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Shawn Chin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /jitsi_url_generator.js: -------------------------------------------------------------------------------- 1 | function JitsiUrlGenerator(callback, domain, roomName, paramGroups) { 2 | this.callback = callback; 3 | this.domain = domain || ""; 4 | this.roomName = roomName || ""; 5 | this.paramGroups = paramGroups || {}; 6 | } 7 | 8 | JitsiUrlGenerator.prototype.trigger = function () { 9 | // If domain or room name not set, trigger callback with empty url 10 | if (!this.domain || !this.roomName) { 11 | this.callback(""); 12 | return; 13 | } 14 | 15 | let params = []; 16 | for (let group of Object.values(this.paramGroups)) { 17 | params = params.concat(flattenParamGroup(group)); 18 | } 19 | 20 | let url = "https://" + this.domain + "/" + this.roomName; 21 | if (params.length > 0) { 22 | url += '#' + params.join("&"); 23 | } 24 | 25 | this.callback(url); 26 | }; 27 | 28 | 29 | JitsiUrlGenerator.prototype.updateRoomName = function (roomName) { 30 | this.roomName = roomName; 31 | this.trigger(); 32 | return this; 33 | }; 34 | 35 | JitsiUrlGenerator.prototype.updateDomain = function (domain) { 36 | this.domain = domain; 37 | this.trigger(); 38 | return this; 39 | }; 40 | 41 | JitsiUrlGenerator.prototype.updateParamGroup = function (group, params) { 42 | this.paramGroups[group] = params; 43 | this.trigger(); 44 | return this; 45 | }; 46 | 47 | function makeUrlGenerator(callback, domain, roomName, paramGroup) { 48 | let urlGen = new JitsiUrlGenerator(callback, domain, roomName, paramGroup); 49 | urlGen.trigger(); 50 | return urlGen; 51 | } 52 | 53 | 54 | function flattenParamGroup(group) { 55 | let params = []; 56 | for (let p in group) { 57 | if (group.hasOwnProperty(p)) { 58 | params.push(p + '=' + group[p]); 59 | } 60 | } 61 | return params; 62 | } 63 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |496 | 👋 Hi there. I hope you found this useful. 497 |
498 |499 | Do note that this page exposes only a small subset of url-based 500 | config overrides afforded by Jitsi. It also makes assumptions about default config values as configured on 501 | meet.jit.si. 502 |
503 | 504 |505 | The intent of this page is to simply illustrate how options should be formatted and composed, and offer 506 | examples of some of the more common settings. 507 |
508 | 509 |510 | For a complete list of config values you can change, see 511 | 512 | configWhitelist.ts 513 | and 514 | 515 | interfaceConfigWhitelist.ts. Also see the 516 | 517 | config.js 518 | and 519 | 520 | interface_config.js 521 | config templates which will contain description of each option and their defaults. 522 | 523 |
524 | 525 |526 | If you spot any issues or outdated options, do feel free to 527 | send a me PR :) 528 |
529 |