liveroom-client-element 0.0.32 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/liveroom-client-element.cjs +6 -6
- package/dist/liveroom-client-element.js +983 -988
- package/dist/main.cjs +1 -1
- package/dist/main.js +37 -29
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const p=i=>Object.freeze(Object.defineProperty({__proto__:null,default:i},Symbol.toStringTag,{value:"Module"})),f="liveroom-client-element",_="0.0.34",E="module",g="./dist/main.js",b="./dist/main.cjs",y=["dist","!dist/vite.svg"],A={".":{import:"./dist/main.js",require:"./dist/main.cjs"},"./liveroom-client-element":{import:"./dist/liveroom-client-element.js",require:"./dist/liveroom-client-element.cjs"}},h={dev:"vite",build:"vite build",preview:"vite preview",format:"prettier --write .","check-format":"prettier . --check",check:"svelte-check --tsconfig ./tsconfig.json",lint:"npm run check-format && npm run check"},j={"livekit-client":"1.13.4","phx-live-state":"0.10.2"},w={"@sveltejs/vite-plugin-svelte":"2.4.6","@tsconfig/svelte":"5.0.2",prettier:"3.0.3",svelte:"4.2.1","svelte-check":"3.5.2",tslib:"2.6.2",typescript:"5.2.2",vite:"4.4.9"},S={name:f,private:!1,version:_,type:E,module:g,main:b,files:y,exports:A,scripts:h,dependencies:j,devDependencies:w};let c,t,e=null;const k="_liveroom",R="_liveroom_user_name",u="liveroom-room-id",I="liveroom-client-element",l=S.version;v();O();async function v(){const o=new URLSearchParams(window.location.search).get(k),a=sessionStorage==null?void 0:sessionStorage.getItem(u);e=document.querySelector("script[src*='/liveroom-client-element']"),e==null||e.setAttribute("version",l);const r=(e==null?void 0:e.getAttribute("data-url"))||"wss://liveroom.app/client_socket",d=(e==null?void 0:e.getAttribute("data-roomid"))||null;let s=o||a||d||void 0;const n=s==null?void 0:s.split("https://meet.google.com/"),m=n==null?void 0:n[1];s=m?m.split("?")[0]:n==null?void 0:n[0],s&&s!=c&&(c=s,sessionStorage==null||sessionStorage.setItem(u,c),t&&(t.remove(),t=void 0),await P(r,c))}function O(){window.addEventListener("popstate",v)}async function P(i,o){if(!o)return!1;await Promise.resolve().then(()=>p(require("./liveroom-client-element.cjs"))),console.log(`[Liveroom] Installed successfully (v${l})`),t=document.createElement(I),t.setAttribute("url",i),t.setAttribute("version",l),o&&t.setAttribute("room_id",o);const r=new URLSearchParams(window.location.search).get(R);return r&&t.setAttribute("user_name",r),document.body.appendChild(t),console.log("[Liveroom] Injected successfully"),!0}
|
package/dist/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const p = "liveroom-client-element", f = "0.0.34", E = "module", _ = "./dist/main.js", g = "./dist/main.cjs", A = [
|
|
2
2
|
"dist",
|
|
3
3
|
"!dist/vite.svg"
|
|
4
|
-
],
|
|
4
|
+
], w = {
|
|
5
5
|
".": {
|
|
6
6
|
import: "./dist/main.js",
|
|
7
7
|
require: "./dist/main.cjs"
|
|
@@ -10,7 +10,7 @@ const a = "liveroom-client-element", d = "0.0.32", v = "module", u = "./dist/mai
|
|
|
10
10
|
import: "./dist/liveroom-client-element.js",
|
|
11
11
|
require: "./dist/liveroom-client-element.cjs"
|
|
12
12
|
}
|
|
13
|
-
},
|
|
13
|
+
}, b = {
|
|
14
14
|
dev: "vite",
|
|
15
15
|
build: "vite build",
|
|
16
16
|
preview: "vite preview",
|
|
@@ -18,10 +18,10 @@ const a = "liveroom-client-element", d = "0.0.32", v = "module", u = "./dist/mai
|
|
|
18
18
|
"check-format": "prettier . --check",
|
|
19
19
|
check: "svelte-check --tsconfig ./tsconfig.json",
|
|
20
20
|
lint: "npm run check-format && npm run check"
|
|
21
|
-
},
|
|
21
|
+
}, h = {
|
|
22
22
|
"livekit-client": "1.13.4",
|
|
23
23
|
"phx-live-state": "0.10.2"
|
|
24
|
-
},
|
|
24
|
+
}, y = {
|
|
25
25
|
"@sveltejs/vite-plugin-svelte": "2.4.6",
|
|
26
26
|
"@tsconfig/svelte": "5.0.2",
|
|
27
27
|
prettier: "3.0.3",
|
|
@@ -30,33 +30,41 @@ const a = "liveroom-client-element", d = "0.0.32", v = "module", u = "./dist/mai
|
|
|
30
30
|
tslib: "2.6.2",
|
|
31
31
|
typescript: "5.2.2",
|
|
32
32
|
vite: "4.4.9"
|
|
33
|
-
},
|
|
34
|
-
name:
|
|
33
|
+
}, j = {
|
|
34
|
+
name: p,
|
|
35
35
|
private: !1,
|
|
36
|
-
version:
|
|
37
|
-
type:
|
|
38
|
-
module:
|
|
39
|
-
main:
|
|
40
|
-
files:
|
|
41
|
-
exports:
|
|
42
|
-
scripts:
|
|
43
|
-
dependencies:
|
|
44
|
-
devDependencies:
|
|
36
|
+
version: f,
|
|
37
|
+
type: E,
|
|
38
|
+
module: _,
|
|
39
|
+
main: g,
|
|
40
|
+
files: A,
|
|
41
|
+
exports: w,
|
|
42
|
+
scripts: b,
|
|
43
|
+
dependencies: h,
|
|
44
|
+
devDependencies: y
|
|
45
45
|
};
|
|
46
|
-
let
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
async function
|
|
51
|
-
const
|
|
46
|
+
let r, t, e = null;
|
|
47
|
+
const S = "_liveroom", k = "_liveroom_user_name", v = "liveroom-room-id", R = "liveroom-client-element", c = j.version;
|
|
48
|
+
u();
|
|
49
|
+
I();
|
|
50
|
+
async function u() {
|
|
51
|
+
const i = new URLSearchParams(window.location.search).get(S), m = sessionStorage == null ? void 0 : sessionStorage.getItem(v);
|
|
52
52
|
e = // prod
|
|
53
|
-
document.querySelector("script[src*='/liveroom-client-element']"), e == null || e.setAttribute("version",
|
|
54
|
-
const
|
|
55
|
-
|
|
53
|
+
document.querySelector("script[src*='/liveroom-client-element']"), e == null || e.setAttribute("version", c);
|
|
54
|
+
const o = (e == null ? void 0 : e.getAttribute("data-url")) || "wss://liveroom.app/client_socket", d = (e == null ? void 0 : e.getAttribute("data-roomid")) || null;
|
|
55
|
+
let s = i || m || d || void 0;
|
|
56
|
+
const n = s == null ? void 0 : s.split(
|
|
57
|
+
"https://meet.google.com/"
|
|
58
|
+
), a = n == null ? void 0 : n[1];
|
|
59
|
+
s = a ? a.split("?")[0] : n == null ? void 0 : n[0], s && s != r && (r = s, sessionStorage == null || sessionStorage.setItem(v, r), t && (t.remove(), t = void 0), await L(o, r));
|
|
56
60
|
}
|
|
57
|
-
function
|
|
58
|
-
window.addEventListener("popstate",
|
|
61
|
+
function I() {
|
|
62
|
+
window.addEventListener("popstate", u);
|
|
59
63
|
}
|
|
60
|
-
async function
|
|
61
|
-
|
|
64
|
+
async function L(l, i) {
|
|
65
|
+
if (!i)
|
|
66
|
+
return !1;
|
|
67
|
+
await import("./liveroom-client-element.js"), console.log(`[Liveroom] Installed successfully (v${c})`), t = document.createElement(R), t.setAttribute("url", l), t.setAttribute("version", c), i && t.setAttribute("room_id", i);
|
|
68
|
+
const o = new URLSearchParams(window.location.search).get(k);
|
|
69
|
+
return o && t.setAttribute("user_name", o), document.body.appendChild(t), console.log("[Liveroom] Injected successfully"), !0;
|
|
62
70
|
}
|