Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This is a really cool project! [PLEASE READ] #15

Closed
dillfrescott opened this issue Jan 26, 2022 · 2 comments
Closed

This is a really cool project! [PLEASE READ] #15

dillfrescott opened this issue Jan 26, 2022 · 2 comments

Comments

@dillfrescott
Copy link

You guys somehow managed to host what is basically Jitsi Meet on a static website server like GitHub Pages.

I would love to know how that's even possible, and why the main Jitsi Meet project doesn't do something similar instead of having to run a full blown server to host Jitsi.

  • Cross
@dillfrescott
Copy link
Author

I feel like this repo deserves a lot more attention!

@deleolajide
Copy link
Contributor

deleolajide commented Jan 29, 2022

Thanks for the kind words 👍

I would love to know how that's even possible, and why the main Jitsi Meet project doesn't do something similar instead of having to run a full blown server to host Jitsi.

In the first version of jitsi-meet, we used to be able to change how it got the room name.

I modified it use a query parameter (https://server?room=xxx) in JavaScript instead of a pathname (https://server/xxx) that requires server-side code.

    function CF() {
        let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
        return _().words(`${e}`.replace(/['\u2019]/g, "")).reduce(((e, t, n) => e + (n ? " " : "") + _().upperFirst(t)), "")
    }
    const AF = "CONNECTION_DISCONNECTED", TF = "CONNECTION_ESTABLISHED", DF = "CONNECTION_FAILED", PF = "CONNECTION_WILL_CONNECT", jF = "SET_LOCATION_URL", MF = "SHOW_CONNECTION_INFO", IF = Symbol("conference"), OF = (Symbol("url"), $e("features/base/connection"));

    function NF() {
		var urlParam = function(name)
		{
			var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
			if (!results) { return undefined; }
			return unescape(results[1] || undefined);
		};
				
        return (e, t) => {
			Sn(t()["features/base/conference"].room = urlParam("room") || localStorage.getItem("ipade.room.name") || "lobby");	// BAO
            const n = Sn(t()["features/base/conference"].room);
			localStorage.setItem("ipade.room.name", n);	// BAO	
			
			if (location.href.indexOf("?room=") == -1) {
				location.href = "index.html?room=" + localStorage.getItem("ipade.room.name");
			}				
			
            return e(((e, t) => {
                const n = function(e) {
                    const t = It(e["features/base/connection"].locationURL),
                        n = t["devices.audioOutput"],
                        a = t["devices.videoInput"],
                        r = t["devices.audioInput"];
                    if (!n && !a && !r) return;
                    const i = {};
                    return n && (i.audioOutput = n), a && (i.videoInput = a), r && (i.audioInput = r), i
                }(t());
                let a;
                return a = n ? e(eI()).then((() => {
                    const a = t();
                    if (!qM(a)) return void Object.keys(n).forEach((t => {
                        e(XM({
                            type: "devices",
                            name: "setDevice",
                            device: {
                                kind: t.toLowerCase(),
                                label: n[t]
                            },
                            responseCallback() {}
                        }))
                    }));
                    const r = {};
                    Object.keys(n).forEach((e => {
                        const t = n[e],
                            i = HM(a, t, e);
                        if (i) {
                            const n = QM[e];
                            r[n.currentDeviceId] = i, r[n.userSelectedDeviceId] = i, r[n.userSelectedDeviceLabel] = t
                        }
                    })), e(hn(r))
                })) : Promise.resolve(), a.then((() => ZM(ra(t()), e).catch((e => LM.warn(`Failed to set audio output device.\n                        Default audio output device will be used instead ${e}`)))))
            })).then((() => APP.conference.init({
                roomName: n
            }).catch((e => {
                APP.API.notifyConferenceLeft(APP.conference.roomName), OF.error(e)
            }))))
        }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants