@mrksbnc/livekit-vue 0.0.1 → 0.0.2
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/index.css +1 -0
- package/dist/livekit-vue.js +20559 -0
- package/dist/livekit-vue.umd.cjs +62 -0
- package/dist/src/assets/index.d.ts +0 -0
- package/dist/src/components/controls/TrackToggle.vue.d.ts +15 -0
- package/dist/src/components/controls/buttons.d.ts +4 -0
- package/dist/src/components/controls/index.d.ts +3 -0
- package/dist/src/components/controls/track_toggle.d.ts +12 -0
- package/dist/src/components/icons/ParticipantPlaceholderIcon.vue.d.ts +2 -0
- package/dist/src/components/icons/TrackIcon.vue.d.ts +7 -0
- package/dist/src/components/index.d.ts +3 -0
- package/dist/src/components/participant/audio_track.d.ts +7 -0
- package/dist/src/composables/index.d.ts +37 -0
- package/dist/src/composables/private/useObservableState.d.ts +8 -0
- package/dist/src/composables/useAudioPlayback.d.ts +11 -0
- package/dist/src/composables/useClearPinButton.d.ts +5 -0
- package/dist/src/composables/useConnectionQualityIndicator.d.ts +10 -0
- package/dist/src/composables/useConnectionState.d.ts +3 -0
- package/dist/src/composables/useDataChannel.d.ts +15 -0
- package/dist/src/composables/useDisconnectButton.d.ts +5 -0
- package/dist/src/composables/useFacingMode.d.ts +10 -0
- package/dist/src/composables/useFocusToggle.d.ts +11 -0
- package/dist/src/composables/useGridLayout.d.ts +10 -0
- package/dist/src/composables/useIsEncrypted.d.ts +8 -0
- package/dist/src/composables/useIsMuted.d.ts +7 -0
- package/dist/src/composables/useIsRecording.d.ts +5 -0
- package/dist/src/composables/useIsSpeaking.d.ts +5 -0
- package/dist/src/composables/useLiveKitRoom.d.ts +8 -0
- package/dist/src/composables/useLocalParticipant.d.ts +16 -0
- package/dist/src/composables/useParticipantTile.d.ts +11 -0
- package/dist/src/composables/useParticipantTracks.d.ts +4 -0
- package/dist/src/composables/useParticipants.d.ts +7 -0
- package/dist/src/composables/usePersistentUserChoices.d.ts +16 -0
- package/dist/src/composables/usePinnedTracks.d.ts +4 -0
- package/dist/src/composables/useRemoteParticipant.d.ts +7 -0
- package/dist/src/composables/useRemoteParticipants.d.ts +7 -0
- package/dist/src/composables/useRoomInfo.d.ts +13 -0
- package/dist/src/composables/useSortedParticipants.d.ts +3 -0
- package/dist/src/composables/useSpeakingParticipants.d.ts +3 -0
- package/dist/src/composables/useStartAudio.d.ts +11 -0
- package/dist/src/composables/useStartVideo.d.ts +11 -0
- package/dist/src/composables/useToken.d.ts +10 -0
- package/dist/src/composables/useTrack.d.ts +3 -0
- package/dist/src/composables/useTrackByName.d.ts +3 -0
- package/dist/src/composables/useTrackMutedIndicator.d.ts +6 -0
- package/dist/src/composables/useTrackRefBySourceOrName.d.ts +4 -0
- package/dist/src/composables/useTrackSyncTime.d.ts +6 -0
- package/dist/src/composables/useTrackToggle.d.ts +21 -0
- package/dist/src/composables/useTrackVolume.d.ts +28 -0
- package/dist/src/composables/useTracks.d.ts +10 -0
- package/dist/src/composables/useVisualStableUpdate.d.ts +8 -0
- package/dist/src/context/index.d.ts +6 -0
- package/dist/src/context/layout.context.d.ts +28 -0
- package/dist/src/context/participant.context.d.ts +9 -0
- package/dist/src/context/pin.context.d.ts +26 -0
- package/dist/src/context/room.context.d.ts +9 -0
- package/dist/src/context/track_reference.context.d.ts +6 -0
- package/dist/src/context/widget.context.d.ts +7 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/types/livekit_room.types.d.ts +68 -0
- package/dist/src/utils/room.utils.d.ts +1 -0
- package/package.json +9 -7
- package/dist/ParticipantPlaceholderIcon.vue_vue_type_script_setup_true_lang-BIDtlT6r.cjs +0 -1
- package/dist/ParticipantPlaceholderIcon.vue_vue_type_script_setup_true_lang-CMBc-QML.js +0 -212
- package/dist/components.cjs.js +0 -1
- package/dist/components.es.js +0 -6
- package/dist/composables.cjs.js +0 -1
- package/dist/composables.es.js +0 -45
- package/dist/context.cjs.js +0 -1
- package/dist/context.es.js +0 -27
- package/dist/index.cjs +0 -1
- package/dist/index.mjs +0 -74
- package/dist/main.css +0 -1
- package/dist/track_reference.context-Bwqjk26y.cjs +0 -1
- package/dist/track_reference.context-D37W7Ir4.js +0 -145
- package/dist/useTrackToggle-DKW8l6WW.cjs +0 -1
- package/dist/useTrackToggle-bvyWWAau.js +0 -81
- package/dist/useVisualStableUpdate-BHGD1D94.js +0 -924
- package/dist/useVisualStableUpdate-BkiUTxKc.cjs +0 -1
- package/src/App.vue +0 -16
- package/src/main.ts +0 -6
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { getCurrentInstance as u, hasInjectionContext as v, inject as P, provide as y, onMounted as m, nextTick as w, getCurrentScope as h, onScopeDispose as g, shallowRef as r } from "vue";
|
|
2
|
-
function M(t) {
|
|
3
|
-
return h() ? (g(t), !0) : !1;
|
|
4
|
-
}
|
|
5
|
-
const s = /* @__PURE__ */ new WeakMap(), R = (...t) => {
|
|
6
|
-
var e;
|
|
7
|
-
const o = t[0], n = (e = u()) == null ? void 0 : e.proxy;
|
|
8
|
-
if (n == null && !v())
|
|
9
|
-
throw new Error("injectLocal must be called in setup");
|
|
10
|
-
return n && s.has(n) && o in s.get(n) ? s.get(n)[o] : P(...t);
|
|
11
|
-
}, S = (t, e) => {
|
|
12
|
-
var o;
|
|
13
|
-
const n = (o = u()) == null ? void 0 : o.proxy;
|
|
14
|
-
if (n == null)
|
|
15
|
-
throw new Error("provideLocal must be called in setup");
|
|
16
|
-
s.has(n) || s.set(n, /* @__PURE__ */ Object.create(null));
|
|
17
|
-
const i = s.get(n);
|
|
18
|
-
i[t] = e, y(t, e);
|
|
19
|
-
};
|
|
20
|
-
function a(t, e) {
|
|
21
|
-
const o = Symbol(t.name || "InjectionState"), n = void 0;
|
|
22
|
-
return [(...C) => {
|
|
23
|
-
const c = t(...C);
|
|
24
|
-
return S(o, c), c;
|
|
25
|
-
}, () => R(o, n)];
|
|
26
|
-
}
|
|
27
|
-
const I = typeof window < "u" && typeof document < "u";
|
|
28
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
29
|
-
function W(t) {
|
|
30
|
-
return Array.isArray(t) ? t : [t];
|
|
31
|
-
}
|
|
32
|
-
function k(t) {
|
|
33
|
-
return u();
|
|
34
|
-
}
|
|
35
|
-
function A(t, e = !0, o) {
|
|
36
|
-
k() ? m(t, o) : e ? t() : w(t);
|
|
37
|
-
}
|
|
38
|
-
const [_, l] = a(
|
|
39
|
-
(t) => r(t)
|
|
40
|
-
);
|
|
41
|
-
function O() {
|
|
42
|
-
return l();
|
|
43
|
-
}
|
|
44
|
-
function D(t) {
|
|
45
|
-
const e = t ? r(t) : l();
|
|
46
|
-
if (!e || !e.value)
|
|
47
|
-
throw new Error("Please call `useProvideRoomContext` on the appropriate parent component");
|
|
48
|
-
return e;
|
|
49
|
-
}
|
|
50
|
-
function E(t, e) {
|
|
51
|
-
return e.msg === "set_pin" ? [e.trackReference] : e.msg === "clear_pin" ? [] : { ...t };
|
|
52
|
-
}
|
|
53
|
-
const [G, p] = a((t) => {
|
|
54
|
-
const e = r(t);
|
|
55
|
-
function o(n) {
|
|
56
|
-
e.value = E(e.value, n);
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
state: e,
|
|
60
|
-
dispatch: o
|
|
61
|
-
};
|
|
62
|
-
}), q = (t) => {
|
|
63
|
-
const e = t ? r(t) : p();
|
|
64
|
-
if (!e)
|
|
65
|
-
throw Error("Tried to access PinContext context outside a PinContextProvider provider.");
|
|
66
|
-
return e;
|
|
67
|
-
}, [z, L] = a(
|
|
68
|
-
(t) => r(t)
|
|
69
|
-
), [B, d] = a(
|
|
70
|
-
(t) => r(t)
|
|
71
|
-
);
|
|
72
|
-
function V() {
|
|
73
|
-
return d();
|
|
74
|
-
}
|
|
75
|
-
function F(t) {
|
|
76
|
-
const e = t ? r(t) : d();
|
|
77
|
-
if (!e)
|
|
78
|
-
throw Error("Tried to access LayoutContext context outside a LayoutContextProvider provider.");
|
|
79
|
-
return e;
|
|
80
|
-
}
|
|
81
|
-
function b() {
|
|
82
|
-
return {
|
|
83
|
-
pin: p(),
|
|
84
|
-
widget: L()
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
function H(t) {
|
|
88
|
-
return r(t) ?? b();
|
|
89
|
-
}
|
|
90
|
-
const [J, f] = a(
|
|
91
|
-
(t) => r(t)
|
|
92
|
-
);
|
|
93
|
-
function K() {
|
|
94
|
-
return f();
|
|
95
|
-
}
|
|
96
|
-
function N(t) {
|
|
97
|
-
const e = t ? r(t) : f();
|
|
98
|
-
if (!e || !e.value)
|
|
99
|
-
throw new Error(
|
|
100
|
-
"Please call `useProvideParticipantContext` on the appropriate parent component"
|
|
101
|
-
);
|
|
102
|
-
return e;
|
|
103
|
-
}
|
|
104
|
-
const [Q, x] = a(
|
|
105
|
-
(t) => r(t)
|
|
106
|
-
);
|
|
107
|
-
function U() {
|
|
108
|
-
return x();
|
|
109
|
-
}
|
|
110
|
-
function X(t) {
|
|
111
|
-
const e = t ? r(t) : x();
|
|
112
|
-
if (!e || !e.value)
|
|
113
|
-
throw new Error("Please call `useTrackRefContextProvider` on the appropriate parent component");
|
|
114
|
-
return e;
|
|
115
|
-
}
|
|
116
|
-
export {
|
|
117
|
-
I as A,
|
|
118
|
-
W as B,
|
|
119
|
-
B as a,
|
|
120
|
-
V as b,
|
|
121
|
-
F as c,
|
|
122
|
-
b as d,
|
|
123
|
-
H as e,
|
|
124
|
-
K as f,
|
|
125
|
-
N as g,
|
|
126
|
-
f as h,
|
|
127
|
-
J as i,
|
|
128
|
-
p as j,
|
|
129
|
-
G as k,
|
|
130
|
-
q as l,
|
|
131
|
-
O as m,
|
|
132
|
-
D as n,
|
|
133
|
-
_ as o,
|
|
134
|
-
E as p,
|
|
135
|
-
l as q,
|
|
136
|
-
U as r,
|
|
137
|
-
X as s,
|
|
138
|
-
x as t,
|
|
139
|
-
d as u,
|
|
140
|
-
Q as v,
|
|
141
|
-
z as w,
|
|
142
|
-
L as x,
|
|
143
|
-
M as y,
|
|
144
|
-
A as z
|
|
145
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const v=require("./track_reference.context-Bwqjk26y.cjs"),h=require("@livekit/components-core"),a=require("vue");require("rxjs");function C(e,t){const r=a.ref(void 0),l=e.subscribe({next:c=>r.value=c,error:void 0});return v.tryOnScopeDispose(()=>{l.unsubscribe()}),r}function g(e){v.tryOnScopeDispose(()=>{e.unsubscribe()})}function b(e){const t=a.shallowRef(e.startWith),r=a.computed(()=>e.observable),l=a.computed(()=>e.resetWhenObservableChanges??!1);function c(){l.value&&(t.value=e.startWith),!(typeof window>"u"||!e.observable)&&r.value&&g(r.value.subscribe(o=>{t.value=o??e.startWith}))}return a.watch(r,c),a.watch(t,c),t}function m(e){var f;const t=v.useMaybeRoomContext(),r=a.ref(!1),l=a.computed(()=>{var u,n;return(n=(u=t==null?void 0:t.value)==null?void 0:u.localParticipant)==null?void 0:n.getTrackPublication(e.source)}),c=a.computed(()=>t?h.setupMediaToggle(e.source,t.value,e.captureOptions,e.publishOptions,e.onDeviceError):h.setupManualToggle()),{className:o,enabledObserver:O,pendingObserver:k,toggle:s}=a.toRefs(c.value),d=b({observable:k.value,startWith:!1}),i=b({observable:O.value,startWith:e.initialState??!!((f=l.value)!=null&&f.isEnabled)});function S(u){u.preventDefault(),u.stopPropagation(),r.value=!0,s==null||s.value().catch(()=>r.value=!1),e.customOnClickHandler&&e.customOnClickHandler(u)}return a.watch(i,u=>{var n;(n=e==null?void 0:e.onChange)==null||n.call(e,u,r.value),r.value=!1}),a.onMounted(()=>{e.initialState!==void 0&&(console.debug("forcing initial toggle state",e.source,e.initialState),s==null||s.value(e.initialState))}),{toggle:s,enabled:i,pending:d,track:l,buttonProps:{"aria-pressed":i.value,"data-lk-source":e.source,"data-lk-enabled":i.value,disabled:d.value??!1,onClick:S}}}exports.useObservable=C;exports.useObservableState=b;exports.useSubscription=g;exports.useTrackToggle=m;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { y as h, m as C } from "./track_reference.context-D37W7Ir4.js";
|
|
2
|
-
import { setupMediaToggle as S, setupManualToggle as W } from "@livekit/components-core";
|
|
3
|
-
import { ref as g, shallowRef as T, computed as i, watch as b, toRefs as M, onMounted as R } from "vue";
|
|
4
|
-
import "rxjs";
|
|
5
|
-
function p(e, a) {
|
|
6
|
-
const r = g(void 0), l = e.subscribe({
|
|
7
|
-
next: (s) => r.value = s,
|
|
8
|
-
error: void 0
|
|
9
|
-
});
|
|
10
|
-
return h(() => {
|
|
11
|
-
l.unsubscribe();
|
|
12
|
-
}), r;
|
|
13
|
-
}
|
|
14
|
-
function w(e) {
|
|
15
|
-
h(() => {
|
|
16
|
-
e.unsubscribe();
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function o(e) {
|
|
20
|
-
const a = T(e.startWith), r = i(() => e.observable), l = i(() => e.resetWhenObservableChanges ?? !1);
|
|
21
|
-
function s() {
|
|
22
|
-
l.value && (a.value = e.startWith), !(typeof window > "u" || !e.observable) && r.value && w(
|
|
23
|
-
r.value.subscribe((v) => {
|
|
24
|
-
a.value = v ?? e.startWith;
|
|
25
|
-
})
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
return b(r, s), b(a, s), a;
|
|
29
|
-
}
|
|
30
|
-
function E(e) {
|
|
31
|
-
var d;
|
|
32
|
-
const a = C(), r = g(!1), l = i(
|
|
33
|
-
() => {
|
|
34
|
-
var t, n;
|
|
35
|
-
return (n = (t = a == null ? void 0 : a.value) == null ? void 0 : t.localParticipant) == null ? void 0 : n.getTrackPublication(e.source);
|
|
36
|
-
}
|
|
37
|
-
), s = i(
|
|
38
|
-
() => a ? S(
|
|
39
|
-
e.source,
|
|
40
|
-
a.value,
|
|
41
|
-
e.captureOptions,
|
|
42
|
-
e.publishOptions,
|
|
43
|
-
e.onDeviceError
|
|
44
|
-
) : W()
|
|
45
|
-
), { className: v, enabledObserver: m, pendingObserver: O, toggle: u } = M(
|
|
46
|
-
s.value
|
|
47
|
-
), f = o({
|
|
48
|
-
observable: O.value,
|
|
49
|
-
startWith: !1
|
|
50
|
-
}), c = o({
|
|
51
|
-
observable: m.value,
|
|
52
|
-
startWith: e.initialState ?? !!((d = l.value) != null && d.isEnabled)
|
|
53
|
-
});
|
|
54
|
-
function k(t) {
|
|
55
|
-
t.preventDefault(), t.stopPropagation(), r.value = !0, u == null || u.value().catch(() => r.value = !1), e.customOnClickHandler && e.customOnClickHandler(t);
|
|
56
|
-
}
|
|
57
|
-
return b(c, (t) => {
|
|
58
|
-
var n;
|
|
59
|
-
(n = e == null ? void 0 : e.onChange) == null || n.call(e, t, r.value), r.value = !1;
|
|
60
|
-
}), R(() => {
|
|
61
|
-
e.initialState !== void 0 && (console.debug("forcing initial toggle state", e.source, e.initialState), u == null || u.value(e.initialState));
|
|
62
|
-
}), {
|
|
63
|
-
toggle: u,
|
|
64
|
-
enabled: c,
|
|
65
|
-
pending: f,
|
|
66
|
-
track: l,
|
|
67
|
-
buttonProps: {
|
|
68
|
-
"aria-pressed": c.value,
|
|
69
|
-
"data-lk-source": e.source,
|
|
70
|
-
"data-lk-enabled": c.value,
|
|
71
|
-
disabled: f.value ?? !1,
|
|
72
|
-
onClick: k
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
export {
|
|
77
|
-
o as a,
|
|
78
|
-
w as b,
|
|
79
|
-
p as c,
|
|
80
|
-
E as u
|
|
81
|
-
};
|