@mrksbnc/livekit-vue 0.0.0 → 0.0.1
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/ParticipantPlaceholderIcon.vue_vue_type_script_setup_true_lang-BIDtlT6r.cjs +1 -0
- package/dist/{components.mjs → ParticipantPlaceholderIcon.vue_vue_type_script_setup_true_lang-CMBc-QML.js} +18 -19
- package/dist/components.cjs.js +1 -0
- package/dist/components.es.js +6 -0
- package/dist/composables.cjs.js +1 -0
- package/dist/composables.es.js +45 -0
- package/dist/context.cjs.js +1 -0
- package/dist/context.es.js +27 -0
- package/dist/index.cjs +1 -2
- package/dist/index.mjs +51 -51
- package/dist/track_reference.context-Bwqjk26y.cjs +1 -0
- package/dist/track_reference.context-D37W7Ir4.js +145 -0
- package/dist/useTrackToggle-DKW8l6WW.cjs +1 -0
- package/dist/useTrackToggle-bvyWWAau.js +81 -0
- package/dist/useVisualStableUpdate-BHGD1D94.js +924 -0
- package/dist/useVisualStableUpdate-BkiUTxKc.cjs +1 -0
- package/package.json +2 -3
- package/dist/components.cjs +0 -2
- package/dist/components.cjs.map +0 -1
- package/dist/components.d.ts +0 -1
- package/dist/components.mjs.map +0 -1
- package/dist/composables.cjs +0 -2
- package/dist/composables.cjs.map +0 -1
- package/dist/composables.d.ts +0 -1
- package/dist/composables.mjs +0 -913
- package/dist/composables.mjs.map +0 -1
- package/dist/contexts-BGR-EyiF.mjs +0 -227
- package/dist/contexts-BGR-EyiF.mjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/shared-B72lPzrj.cjs +0 -2
- package/dist/shared-B72lPzrj.cjs.map +0 -1
- package/dist/shared-Bt-fJtlk.cjs +0 -2
- package/dist/shared-Bt-fJtlk.cjs.map +0 -1
- package/dist/shared-UqxyWhFA.cjs +0 -2
- package/dist/shared-UqxyWhFA.cjs.map +0 -1
- /package/dist/{index.css → main.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue");require("./track_reference.context-Bwqjk26y.cjs");require("@livekit/components-core");require("rxjs");const c=require("livekit-client"),u=require("./useTrackToggle-DKW8l6WW.cjs"),d={xmlns:"http://www.w3.org/2000/svg",width:"auto",height:"auto",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"mic-off",viewBox:"0 0 24 24"};function h(n,o){return e.openBlock(),e.createElementBlock("svg",d,o[0]||(o[0]=[e.createElementVNode("path",{d:"m1 1 22 22M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"},null,-1),e.createElementVNode("path",{d:"M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23M12 19v4M8 23h8"},null,-1)]))}const p={render:h},m={xmlns:"http://www.w3.org/2000/svg",width:"auto",height:"auto",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"mic",viewBox:"0 0 24 24"};function k(n,o){return e.openBlock(),e.createElementBlock("svg",m,o[0]||(o[0]=[e.createElementVNode("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3"},null,-1),e.createElementVNode("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2M12 19v4M8 23h8"},null,-1)]))}const v={render:k},f={xmlns:"http://www.w3.org/2000/svg",width:"auto",height:"auto",fill:"none",class:"share-screen-off",viewBox:"0 0 24 24"};function w(n,o){return e.openBlock(),e.createElementBlock("svg",f,o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"m9.4 15.654 2.6-2.6 2.6 2.6 1.054-1.054-2.6-2.6 2.6-2.6L14.6 8.346l-2.6 2.6-2.6-2.6L8.346 9.4l2.6 2.6-2.6 2.6zM4.308 19.5q-.758 0-1.283-.525a1.75 1.75 0 0 1-.525-1.283V6.308q0-.758.525-1.283T4.308 4.5h15.384q.758 0 1.283.525t.525 1.283v11.384q0 .758-.525 1.283t-1.283.525zm0-1.5h15.384a.3.3 0 0 0 .212-.096.3.3 0 0 0 .096-.212V6.308a.3.3 0 0 0-.096-.212.3.3 0 0 0-.212-.096H4.308a.3.3 0 0 0-.212.096.3.3 0 0 0-.096.212v11.384q0 .116.096.212a.3.3 0 0 0 .212.096"},null,-1)]))}const g={render:w},B={xmlns:"http://www.w3.org/2000/svg",width:"auto",height:"auto",fill:"none",class:"share-screen",viewBox:"0 0 20 20"};function _(n,o){return e.openBlock(),e.createElementBlock("svg",B,o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M9.375 13.045h1.25V9.362l1.542 1.529.89-.891L10 6.955 6.955 10l.891.878 1.53-1.529zM3.59 16.25q-.631 0-1.069-.437a1.45 1.45 0 0 1-.437-1.07V5.256q0-.63.437-1.069A1.45 1.45 0 0 1 3.59 3.75h12.82q.632 0 1.07.438.437.437.437 1.068v9.488q0 .63-.438 1.069a1.45 1.45 0 0 1-1.069.437zm0-1.25h12.82a.24.24 0 0 0 .177-.08.24.24 0 0 0 .08-.177V5.256a.24.24 0 0 0-.08-.176.25.25 0 0 0-.177-.08H3.59a.25.25 0 0 0-.176.08.25.25 0 0 0-.08.176v9.488q0 .096.08.176t.176.08"},null,-1)]))}const C={render:_},x={xmlns:"http://www.w3.org/2000/svg",width:"auto",height:"auto",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"video-off",viewBox:"0 0 24 24"};function V(n,o){return e.openBlock(),e.createElementBlock("svg",x,o[0]||(o[0]=[e.createElementVNode("path",{d:"M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10M1 1l22 22"},null,-1)]))}const E={render:V},M={xmlns:"http://www.w3.org/2000/svg",width:"auto",height:"auto",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"video",viewBox:"0 0 24 24"};function y(n,o){return e.openBlock(),e.createElementBlock("svg",M,o[0]||(o[0]=[e.createElementVNode("path",{d:"m23 7-7 5 7 5z"},null,-1),e.createElementVNode("rect",{width:"15",height:"14",x:"1",y:"5",rx:"2",ry:"2"},null,-1)]))}const $={render:y},b={key:6,class:"track-icon__none"},i=e.defineComponent({__name:"TrackIcon",props:{source:{},enabled:{type:Boolean}},setup(n){const o=n,t=e.computed(()=>{switch(o.source){case c.Track.Source.Camera:return o.enabled?"camera":"camera-disabled";case c.Track.Source.Microphone:return o.enabled?"microphone":"microphone-disabled";case c.Track.Source.ScreenShare:return o.enabled?"screen-share":"screen-share-disabled";default:return"none"}}),r=e.computed(()=>"track-icon w-4 h-4 flex items-center justify-center");return(a,l)=>t.value==="camera"?(e.openBlock(),e.createBlock(e.unref($),{key:0,class:e.normalizeClass(r.value)},null,8,["class"])):t.value==="camera-disabled"?(e.openBlock(),e.createBlock(e.unref(E),{key:1,class:e.normalizeClass(r.value)},null,8,["class"])):t.value==="microphone"?(e.openBlock(),e.createBlock(e.unref(v),{key:2,class:e.normalizeClass(r.value)},null,8,["class"])):t.value==="microphone-disabled"?(e.openBlock(),e.createBlock(e.unref(p),{key:3,class:e.normalizeClass(r.value)},null,8,["class"])):t.value==="screen-share"?(e.openBlock(),e.createBlock(e.unref(C),{key:4,class:e.normalizeClass(r.value)},null,8,["class"])):t.value==="screen-share-disabled"?(e.openBlock(),e.createBlock(e.unref(g),{key:5,class:e.normalizeClass(r.value)},null,8,["class"])):(e.openBlock(),e.createElementBlock("span",b))}}),q={key:0},S=e.defineComponent({__name:"TrackToggle",props:{source:{},showIcon:{type:Boolean},initialState:{type:Boolean},captureOptions:{},publishOptions:{},onChange:{type:Function},onDeviceError:{type:Function},customOnClickHandler:{type:Function}},setup(n){const o=n,t=u.useTrackToggle(o),{buttonProps:r,enabled:a}=e.toRefs(t),l=e.ref(!1);return e.onMounted(()=>{l.value=!0}),(s,P)=>l.value?(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:0},e.unref(r),{class:"track-toggle"}),[s.showIcon?(e.openBlock(),e.createElementBlock("span",q,[e.createVNode(i,{enabled:e.unref(a),source:s.source},null,8,["enabled","source"])])):e.createCommentVNode("",!0)],16)):e.createCommentVNode("",!0)}}),N={xmlns:"http://www.w3.org/2000/svg",width:"auto",height:"auto",fill:"none",viewBox:"0 0 320 320"};function T(n,o){return e.openBlock(),e.createElementBlock("svg",N,o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M160 180c44.182 0 80-35.817 80-80s-35.818-80-80-80-80 35.817-80 80 35.817 80 80 80M97.654 194.614c5.613-2.796 12.187-2.133 17.865.527 13.506 6.325 28.581 9.859 44.48 9.859 15.9 0 30.974-3.534 44.481-9.859 5.678-2.66 12.252-3.323 17.865-.527 40.358 20.105 69.64 59.122 76.246 105.448C300.15 310.997 291.045 320 280 320H40c-11.046 0-20.15-9.003-18.591-19.938 6.605-46.326 35.888-85.342 76.245-105.448"},null,-1)]))}const z={render:T},H=e.defineComponent({__name:"ParticipantPlaceholderIcon",setup(n){return(o,t)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(z))))}});exports._sfc_main=S;exports._sfc_main$1=H;exports._sfc_main$2=i;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createElementBlock as t, openBlock as o, createElementVNode as r, defineComponent as h, computed as m, createBlock as c, unref as a, normalizeClass as i, toRefs as g, ref as f, onMounted as
|
|
2
|
-
import "./
|
|
1
|
+
import { createElementBlock as t, openBlock as o, createElementVNode as r, defineComponent as h, computed as m, createBlock as c, unref as a, normalizeClass as i, toRefs as g, ref as f, onMounted as _, createCommentVNode as w, mergeProps as k, createVNode as x, resolveDynamicComponent as M } from "vue";
|
|
2
|
+
import "./track_reference.context-D37W7Ir4.js";
|
|
3
3
|
import "@livekit/components-core";
|
|
4
4
|
import "rxjs";
|
|
5
5
|
import { Track as d } from "livekit-client";
|
|
6
|
-
import {
|
|
6
|
+
import { u as y } from "./useTrackToggle-bvyWWAau.js";
|
|
7
7
|
const b = {
|
|
8
8
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9
9
|
width: "auto",
|
|
@@ -40,7 +40,7 @@ function B(n, e) {
|
|
|
40
40
|
r("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2M12 19v4M8 23h8" }, null, -1)
|
|
41
41
|
]));
|
|
42
42
|
}
|
|
43
|
-
const V = { render: B },
|
|
43
|
+
const V = { render: B }, q = {
|
|
44
44
|
xmlns: "http://www.w3.org/2000/svg",
|
|
45
45
|
width: "auto",
|
|
46
46
|
height: "auto",
|
|
@@ -48,15 +48,15 @@ const V = { render: B }, T = {
|
|
|
48
48
|
class: "share-screen-off",
|
|
49
49
|
viewBox: "0 0 24 24"
|
|
50
50
|
};
|
|
51
|
-
function
|
|
52
|
-
return o(), t("svg",
|
|
51
|
+
function T(n, e) {
|
|
52
|
+
return o(), t("svg", q, e[0] || (e[0] = [
|
|
53
53
|
r("path", {
|
|
54
54
|
fill: "currentColor",
|
|
55
55
|
d: "m9.4 15.654 2.6-2.6 2.6 2.6 1.054-1.054-2.6-2.6 2.6-2.6L14.6 8.346l-2.6 2.6-2.6-2.6L8.346 9.4l2.6 2.6-2.6 2.6zM4.308 19.5q-.758 0-1.283-.525a1.75 1.75 0 0 1-.525-1.283V6.308q0-.758.525-1.283T4.308 4.5h15.384q.758 0 1.283.525t.525 1.283v11.384q0 .758-.525 1.283t-1.283.525zm0-1.5h15.384a.3.3 0 0 0 .212-.096.3.3 0 0 0 .096-.212V6.308a.3.3 0 0 0-.096-.212.3.3 0 0 0-.212-.096H4.308a.3.3 0 0 0-.212.096.3.3 0 0 0-.096.212v11.384q0 .116.096.212a.3.3 0 0 0 .212.096"
|
|
56
56
|
}, null, -1)
|
|
57
57
|
]));
|
|
58
58
|
}
|
|
59
|
-
const
|
|
59
|
+
const z = { render: T }, H = {
|
|
60
60
|
xmlns: "http://www.w3.org/2000/svg",
|
|
61
61
|
width: "auto",
|
|
62
62
|
height: "auto",
|
|
@@ -64,15 +64,15 @@ const P = { render: q }, I = {
|
|
|
64
64
|
class: "share-screen",
|
|
65
65
|
viewBox: "0 0 20 20"
|
|
66
66
|
};
|
|
67
|
-
function
|
|
68
|
-
return o(), t("svg",
|
|
67
|
+
function P(n, e) {
|
|
68
|
+
return o(), t("svg", H, e[0] || (e[0] = [
|
|
69
69
|
r("path", {
|
|
70
70
|
fill: "currentColor",
|
|
71
71
|
d: "M9.375 13.045h1.25V9.362l1.542 1.529.89-.891L10 6.955 6.955 10l.891.878 1.53-1.529zM3.59 16.25q-.631 0-1.069-.437a1.45 1.45 0 0 1-.437-1.07V5.256q0-.63.437-1.069A1.45 1.45 0 0 1 3.59 3.75h12.82q.632 0 1.07.438.437.437.437 1.068v9.488q0 .63-.438 1.069a1.45 1.45 0 0 1-1.069.437zm0-1.25h12.82a.24.24 0 0 0 .177-.08.24.24 0 0 0 .08-.177V5.256a.24.24 0 0 0-.08-.176.25.25 0 0 0-.177-.08H3.59a.25.25 0 0 0-.176.08.25.25 0 0 0-.08.176v9.488q0 .096.08.176t.176.08"
|
|
72
72
|
}, null, -1)
|
|
73
73
|
]));
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const j = { render: P }, I = {
|
|
76
76
|
xmlns: "http://www.w3.org/2000/svg",
|
|
77
77
|
width: "auto",
|
|
78
78
|
height: "auto",
|
|
@@ -85,7 +85,7 @@ const H = { render: z }, j = {
|
|
|
85
85
|
viewBox: "0 0 24 24"
|
|
86
86
|
};
|
|
87
87
|
function O(n, e) {
|
|
88
|
-
return o(), t("svg",
|
|
88
|
+
return o(), t("svg", I, e[0] || (e[0] = [
|
|
89
89
|
r("path", { d: "M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10M1 1l22 22" }, null, -1)
|
|
90
90
|
]));
|
|
91
91
|
}
|
|
@@ -151,10 +151,10 @@ const F = { render: E }, N = {
|
|
|
151
151
|
}, null, 8, ["class"])) : s.value === "microphone-disabled" ? (o(), c(a(S), {
|
|
152
152
|
key: 3,
|
|
153
153
|
class: i(l.value)
|
|
154
|
-
}, null, 8, ["class"])) : s.value === "screen-share" ? (o(), c(a(
|
|
154
|
+
}, null, 8, ["class"])) : s.value === "screen-share" ? (o(), c(a(j), {
|
|
155
155
|
key: 4,
|
|
156
156
|
class: i(l.value)
|
|
157
|
-
}, null, 8, ["class"])) : s.value === "screen-share-disabled" ? (o(), c(a(
|
|
157
|
+
}, null, 8, ["class"])) : s.value === "screen-share-disabled" ? (o(), c(a(z), {
|
|
158
158
|
key: 5,
|
|
159
159
|
class: i(l.value)
|
|
160
160
|
}, null, 8, ["class"])) : (o(), t("span", N));
|
|
@@ -173,9 +173,9 @@ const F = { render: E }, N = {
|
|
|
173
173
|
},
|
|
174
174
|
setup(n) {
|
|
175
175
|
const s = y(n), { buttonProps: l, enabled: p } = g(s), u = f(!1);
|
|
176
|
-
return
|
|
176
|
+
return _(() => {
|
|
177
177
|
u.value = !0;
|
|
178
|
-
}), (v, Q) => u.value ? (o(), t("button",
|
|
178
|
+
}), (v, Q) => u.value ? (o(), t("button", k({ key: 0 }, a(l), { class: "track-toggle" }), [
|
|
179
179
|
v.showIcon ? (o(), t("span", R, [
|
|
180
180
|
x(A, {
|
|
181
181
|
enabled: a(p),
|
|
@@ -206,8 +206,7 @@ const K = { render: J }, ne = /* @__PURE__ */ h({
|
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
208
|
export {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
209
|
+
oe as _,
|
|
210
|
+
ne as a,
|
|
211
|
+
A as b
|
|
212
212
|
};
|
|
213
|
-
//# sourceMappingURL=components.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ParticipantPlaceholderIcon.vue_vue_type_script_setup_true_lang-BIDtlT6r.cjs");exports.ParticipantPlaceholderIcon=e._sfc_main$1;exports.TrackIcon=e._sfc_main$2;exports.TrackToggle=e._sfc_main;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useVisualStableUpdate-BkiUTxKc.cjs"),s=require("./useTrackToggle-DKW8l6WW.cjs");exports.FacingMode=e.FacingMode;exports.requiredPlaceholders=e.requiredPlaceholders;exports.useAudioPlayback=e.useAudioPlayback;exports.useAudioWaveform=e.useAudioWaveform;exports.useClearPinButton=e.useClearPinButton;exports.useConnectionQualityIndicator=e.useConnectionQualityIndicator;exports.useConnectionState=e.useConnectionState;exports.useDataChannel=e.useDataChannel;exports.useDisconnectButton=e.useDisconnectButton;exports.useFacingMode=e.useFacingMode;exports.useFocusToggle=e.useFocusToggle;exports.useGridLayout=e.useGridLayout;exports.useIsEncrypted=e.useIsEncrypted;exports.useIsMuted=e.useIsMuted;exports.useIsRecording=e.useIsRecording;exports.useIsSpeaking=e.useIsSpeaking;exports.useLiveKitRoom=e.useLiveKitRoom;exports.useLocalParticipant=e.useLocalParticipant;exports.useMultibandTrackVolume=e.useMultibandTrackVolume;exports.useParticipantTile=e.useParticipantTile;exports.useParticipantTracks=e.useParticipantTracks;exports.useParticipants=e.useParticipants;exports.usePersistentUserChoices=e.usePersistentUserChoices;exports.usePinnedTracks=e.usePinnedTracks;exports.useRemoteParticipant=e.useRemoteParticipant;exports.useRemoteParticipants=e.useRemoteParticipants;exports.useRoomInfo=e.useRoomInfo;exports.useSortedParticipants=e.useSortedParticipants;exports.useSpeakingParticipants=e.useSpeakingParticipants;exports.useStartAudio=e.useStartAudio;exports.useStartVideo=e.useStartVideo;exports.useToken=e.useToken;exports.useTrack=e.useTrack;exports.useTrackByName=e.useTrackByName;exports.useTrackMutedIndicator=e.useTrackMutedIndicator;exports.useTrackRefBySourceOrName=e.useTrackRefBySourceOrName;exports.useTrackSyncTime=e.useTrackSyncTime;exports.useTrackVolume=e.useTrackVolume;exports.useTracks=e.useTracks;exports.useVisualStableUpdate=e.useVisualStableUpdate;exports.useTrackToggle=s.useTrackToggle;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { F as e, H as u, u as t, K as i, a as o, b as r, c, d as n, e as d, f as k, g as l, h as T, i as p, j as m, k as P, l as g, m as S, n as y, L as I, p as f, q as C, o as M, r as R, s as B, t as b, v as h, w as A, x as F, y as L, z as V, A as v, B as x, C as D, D as N, E as q, G as E, J as G, M as K, I as U, N as j } from "./useVisualStableUpdate-BHGD1D94.js";
|
|
2
|
+
import { u as z } from "./useTrackToggle-bvyWWAau.js";
|
|
3
|
+
export {
|
|
4
|
+
e as FacingMode,
|
|
5
|
+
u as requiredPlaceholders,
|
|
6
|
+
t as useAudioPlayback,
|
|
7
|
+
i as useAudioWaveform,
|
|
8
|
+
o as useClearPinButton,
|
|
9
|
+
r as useConnectionQualityIndicator,
|
|
10
|
+
c as useConnectionState,
|
|
11
|
+
n as useDataChannel,
|
|
12
|
+
d as useDisconnectButton,
|
|
13
|
+
k as useFacingMode,
|
|
14
|
+
l as useFocusToggle,
|
|
15
|
+
T as useGridLayout,
|
|
16
|
+
p as useIsEncrypted,
|
|
17
|
+
m as useIsMuted,
|
|
18
|
+
P as useIsRecording,
|
|
19
|
+
g as useIsSpeaking,
|
|
20
|
+
S as useLiveKitRoom,
|
|
21
|
+
y as useLocalParticipant,
|
|
22
|
+
I as useMultibandTrackVolume,
|
|
23
|
+
f as useParticipantTile,
|
|
24
|
+
C as useParticipantTracks,
|
|
25
|
+
M as useParticipants,
|
|
26
|
+
R as usePersistentUserChoices,
|
|
27
|
+
B as usePinnedTracks,
|
|
28
|
+
b as useRemoteParticipant,
|
|
29
|
+
h as useRemoteParticipants,
|
|
30
|
+
A as useRoomInfo,
|
|
31
|
+
F as useSortedParticipants,
|
|
32
|
+
L as useSpeakingParticipants,
|
|
33
|
+
V as useStartAudio,
|
|
34
|
+
v as useStartVideo,
|
|
35
|
+
x as useToken,
|
|
36
|
+
D as useTrack,
|
|
37
|
+
N as useTrackByName,
|
|
38
|
+
q as useTrackMutedIndicator,
|
|
39
|
+
E as useTrackRefBySourceOrName,
|
|
40
|
+
G as useTrackSyncTime,
|
|
41
|
+
z as useTrackToggle,
|
|
42
|
+
K as useTrackVolume,
|
|
43
|
+
U as useTracks,
|
|
44
|
+
j as useVisualStableUpdate
|
|
45
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./track_reference.context-Bwqjk26y.cjs");exports.pinReducer=e.pinReducer;exports.useCreateLayoutContext=e.useCreateLayoutContext;exports.useEnsureCreateLayoutContext=e.useEnsureCreateLayoutContext;exports.useEnsureLayoutContext=e.useEnsureLayoutContext;exports.useEnsureParticipant=e.useEnsureParticipant;exports.useEnsurePinContext=e.useEnsurePinContext;exports.useEnsureRoomContext=e.useEnsureRoomContext;exports.useEnsureTrackRef=e.useEnsureTrackRef;exports.useLayoutContext=e.useLayoutContext;exports.useMaybeLayoutContext=e.useMaybeLayoutContext;exports.useMaybeParticipantContext=e.useMaybeParticipantContext;exports.useMaybeRoomContext=e.useMaybeRoomContext;exports.useMaybeTrackRefContext=e.useMaybeTrackRefContext;exports.useParticipantContext=e.useParticipantContext;exports.usePinContext=e.usePinContext;exports.useProvideLayoutContext=e.useProvideLayoutContext;exports.useProvideParticipantContext=e.useProvideParticipantContext;exports.useProvidePinContext=e.useProvidePinContext;exports.useProvideRoomContext=e.useProvideRoomContext;exports.useProvideWidgetContext=e.useProvideWidgetContext;exports.useRoomContext=e.useRoomContext;exports.useTrackRefContext=e.useTrackRefContext;exports.useTrackRefContextProvider=e.useTrackRefContextProvider;exports.useWidgetContext=e.useWidgetContext;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { p as s, d as a, e as o, c as u, g as n, l as r, n as x, s as C, u as i, b as P, f as c, m as d, r as y, h as R, j as p, a as v, i as f, k as m, o as E, w as L, q as b, t as k, v as M, x as T } from "./track_reference.context-D37W7Ir4.js";
|
|
2
|
+
export {
|
|
3
|
+
s as pinReducer,
|
|
4
|
+
a as useCreateLayoutContext,
|
|
5
|
+
o as useEnsureCreateLayoutContext,
|
|
6
|
+
u as useEnsureLayoutContext,
|
|
7
|
+
n as useEnsureParticipant,
|
|
8
|
+
r as useEnsurePinContext,
|
|
9
|
+
x as useEnsureRoomContext,
|
|
10
|
+
C as useEnsureTrackRef,
|
|
11
|
+
i as useLayoutContext,
|
|
12
|
+
P as useMaybeLayoutContext,
|
|
13
|
+
c as useMaybeParticipantContext,
|
|
14
|
+
d as useMaybeRoomContext,
|
|
15
|
+
y as useMaybeTrackRefContext,
|
|
16
|
+
R as useParticipantContext,
|
|
17
|
+
p as usePinContext,
|
|
18
|
+
v as useProvideLayoutContext,
|
|
19
|
+
f as useProvideParticipantContext,
|
|
20
|
+
m as useProvidePinContext,
|
|
21
|
+
E as useProvideRoomContext,
|
|
22
|
+
L as useProvideWidgetContext,
|
|
23
|
+
b as useRoomContext,
|
|
24
|
+
k as useTrackRefContext,
|
|
25
|
+
M as useTrackRefContextProvider,
|
|
26
|
+
T as useWidgetContext
|
|
27
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./ParticipantPlaceholderIcon.vue_vue_type_script_setup_true_lang-BIDtlT6r.cjs"),e=require("./useVisualStableUpdate-BkiUTxKc.cjs"),s=require("./useTrackToggle-DKW8l6WW.cjs"),t=require("./track_reference.context-Bwqjk26y.cjs");exports.ParticipantPlaceholderIcon=u._sfc_main$1;exports.TrackIcon=u._sfc_main$2;exports.TrackToggle=u._sfc_main;exports.FacingMode=e.FacingMode;exports.requiredPlaceholders=e.requiredPlaceholders;exports.useAudioPlayback=e.useAudioPlayback;exports.useAudioWaveform=e.useAudioWaveform;exports.useClearPinButton=e.useClearPinButton;exports.useConnectionQualityIndicator=e.useConnectionQualityIndicator;exports.useConnectionState=e.useConnectionState;exports.useDataChannel=e.useDataChannel;exports.useDisconnectButton=e.useDisconnectButton;exports.useFacingMode=e.useFacingMode;exports.useFocusToggle=e.useFocusToggle;exports.useGridLayout=e.useGridLayout;exports.useIsEncrypted=e.useIsEncrypted;exports.useIsMuted=e.useIsMuted;exports.useIsRecording=e.useIsRecording;exports.useIsSpeaking=e.useIsSpeaking;exports.useLiveKitRoom=e.useLiveKitRoom;exports.useLocalParticipant=e.useLocalParticipant;exports.useMultibandTrackVolume=e.useMultibandTrackVolume;exports.useParticipantTile=e.useParticipantTile;exports.useParticipantTracks=e.useParticipantTracks;exports.useParticipants=e.useParticipants;exports.usePersistentUserChoices=e.usePersistentUserChoices;exports.usePinnedTracks=e.usePinnedTracks;exports.useRemoteParticipant=e.useRemoteParticipant;exports.useRemoteParticipants=e.useRemoteParticipants;exports.useRoomInfo=e.useRoomInfo;exports.useSortedParticipants=e.useSortedParticipants;exports.useSpeakingParticipants=e.useSpeakingParticipants;exports.useStartAudio=e.useStartAudio;exports.useStartVideo=e.useStartVideo;exports.useToken=e.useToken;exports.useTrack=e.useTrack;exports.useTrackByName=e.useTrackByName;exports.useTrackMutedIndicator=e.useTrackMutedIndicator;exports.useTrackRefBySourceOrName=e.useTrackRefBySourceOrName;exports.useTrackSyncTime=e.useTrackSyncTime;exports.useTrackVolume=e.useTrackVolume;exports.useTracks=e.useTracks;exports.useVisualStableUpdate=e.useVisualStableUpdate;exports.useTrackToggle=s.useTrackToggle;exports.pinReducer=t.pinReducer;exports.useCreateLayoutContext=t.useCreateLayoutContext;exports.useEnsureCreateLayoutContext=t.useEnsureCreateLayoutContext;exports.useEnsureLayoutContext=t.useEnsureLayoutContext;exports.useEnsureParticipant=t.useEnsureParticipant;exports.useEnsurePinContext=t.useEnsurePinContext;exports.useEnsureRoomContext=t.useEnsureRoomContext;exports.useEnsureTrackRef=t.useEnsureTrackRef;exports.useLayoutContext=t.useLayoutContext;exports.useMaybeLayoutContext=t.useMaybeLayoutContext;exports.useMaybeParticipantContext=t.useMaybeParticipantContext;exports.useMaybeRoomContext=t.useMaybeRoomContext;exports.useMaybeTrackRefContext=t.useMaybeTrackRefContext;exports.useParticipantContext=t.useParticipantContext;exports.usePinContext=t.usePinContext;exports.useProvideLayoutContext=t.useProvideLayoutContext;exports.useProvideParticipantContext=t.useProvideParticipantContext;exports.useProvidePinContext=t.useProvidePinContext;exports.useProvideRoomContext=t.useProvideRoomContext;exports.useProvideWidgetContext=t.useProvideWidgetContext;exports.useRoomContext=t.useRoomContext;exports.useTrackRefContext=t.useTrackRefContext;exports.useTrackRefContextProvider=t.useTrackRefContextProvider;exports.useWidgetContext=t.useWidgetContext;
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { a, b as t, _ as u } from "./ParticipantPlaceholderIcon.vue_vue_type_script_setup_true_lang-CMBc-QML.js";
|
|
2
|
+
import { F as n, H as r, u as i, K as c, a as d, b as C, c as P, d as x, e as p, f as k, g as T, h as l, i as m, j as y, k as g, l as R, m as f, n as b, L as v, p as I, q as L, o as M, r as S, s as E, t as h, v as B, w as A, x as F, y as V, z as q, A as D, B as N, C as W, D as j, E as w, G, J as K, M as U, I as z, N as H } from "./useVisualStableUpdate-BHGD1D94.js";
|
|
3
|
+
import { u as O } from "./useTrackToggle-bvyWWAau.js";
|
|
4
|
+
import { p as _, d as X, e as Y, c as Z, g as $, l as ee, n as se, s as ae, u as te, b as ue, f as oe, m as ne, r as re, h as ie, j as ce, a as de, i as Ce, k as Pe, o as xe, w as pe, q as ke, t as Te, v as le, x as me } from "./track_reference.context-D37W7Ir4.js";
|
|
4
5
|
export {
|
|
5
6
|
n as FacingMode,
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
a as ParticipantPlaceholderIcon,
|
|
8
|
+
t as TrackIcon,
|
|
8
9
|
u as TrackToggle,
|
|
9
|
-
|
|
10
|
+
_ as pinReducer,
|
|
10
11
|
r as requiredPlaceholders,
|
|
11
12
|
i as useAudioPlayback,
|
|
12
13
|
c as useAudioWaveform,
|
|
@@ -15,60 +16,59 @@ export {
|
|
|
15
16
|
P as useConnectionState,
|
|
16
17
|
X as useCreateLayoutContext,
|
|
17
18
|
x as useDataChannel,
|
|
18
|
-
|
|
19
|
+
p as useDisconnectButton,
|
|
19
20
|
Y as useEnsureCreateLayoutContext,
|
|
20
21
|
Z as useEnsureLayoutContext,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
$ as useEnsureParticipant,
|
|
23
|
+
ee as useEnsurePinContext,
|
|
24
|
+
se as useEnsureRoomContext,
|
|
25
|
+
ae as useEnsureTrackRef,
|
|
25
26
|
k as useFacingMode,
|
|
26
|
-
|
|
27
|
+
T as useFocusToggle,
|
|
27
28
|
l as useGridLayout,
|
|
28
29
|
m as useIsEncrypted,
|
|
29
30
|
y as useIsMuted,
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
g as useIsRecording,
|
|
32
|
+
R as useIsSpeaking,
|
|
32
33
|
te as useLayoutContext,
|
|
33
34
|
f as useLiveKitRoom,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
b as useLocalParticipant,
|
|
36
|
+
ue as useMaybeLayoutContext,
|
|
37
|
+
oe as useMaybeParticipantContext,
|
|
38
|
+
ne as useMaybeRoomContext,
|
|
39
|
+
re as useMaybeTrackRefContext,
|
|
40
|
+
v as useMultibandTrackVolume,
|
|
41
|
+
ie as useParticipantContext,
|
|
42
|
+
I as useParticipantTile,
|
|
43
|
+
L as useParticipantTracks,
|
|
44
|
+
M as useParticipants,
|
|
45
|
+
S as usePersistentUserChoices,
|
|
46
|
+
ce as usePinContext,
|
|
46
47
|
E as usePinnedTracks,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
de as useProvideLayoutContext,
|
|
49
|
+
Ce as useProvideParticipantContext,
|
|
50
|
+
Pe as useProvidePinContext,
|
|
51
|
+
xe as useProvideRoomContext,
|
|
52
|
+
pe as useProvideWidgetContext,
|
|
52
53
|
h as useRemoteParticipant,
|
|
53
54
|
B as useRemoteParticipants,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
55
|
+
ke as useRoomContext,
|
|
56
|
+
A as useRoomInfo,
|
|
57
|
+
F as useSortedParticipants,
|
|
58
|
+
V as useSpeakingParticipants,
|
|
59
|
+
q as useStartAudio,
|
|
60
|
+
D as useStartVideo,
|
|
61
|
+
N as useToken,
|
|
62
|
+
W as useTrack,
|
|
63
|
+
j as useTrackByName,
|
|
64
|
+
w as useTrackMutedIndicator,
|
|
65
|
+
G as useTrackRefBySourceOrName,
|
|
66
|
+
Te as useTrackRefContext,
|
|
67
|
+
le as useTrackRefContextProvider,
|
|
68
|
+
K as useTrackSyncTime,
|
|
69
|
+
O as useTrackToggle,
|
|
70
|
+
U as useTrackVolume,
|
|
71
|
+
z as useTracks,
|
|
72
|
+
H as useVisualStableUpdate,
|
|
73
|
+
me as useWidgetContext
|
|
73
74
|
};
|
|
74
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("vue");function v(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}const s=new WeakMap,R=(...e)=>{var t;const r=e[0],o=(t=n.getCurrentInstance())==null?void 0:t.proxy;if(o==null&&!n.hasInjectionContext())throw new Error("injectLocal must be called in setup");return o&&s.has(o)&&r in s.get(o)?s.get(o)[r]:n.inject(...e)},w=(e,t)=>{var r;const o=(r=n.getCurrentInstance())==null?void 0:r.proxy;if(o==null)throw new Error("provideLocal must be called in setup");s.has(o)||s.set(o,Object.create(null));const d=s.get(o);d[e]=t,n.provide(e,t)};function u(e,t){const r=Symbol(e.name||"InjectionState"),o=void 0;return[(...y)=>{const C=e(...y);return w(r,C),C},()=>R(r,o)]}const h=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function g(e){return Array.isArray(e)?e:[e]}function m(e){return n.getCurrentInstance()}function E(e,t=!0,r){m()?n.onMounted(e,r):t?e():n.nextTick(e)}const[L,a]=u(e=>n.shallowRef(e));function k(){return a()}function S(e){const t=e?n.shallowRef(e):a();if(!t||!t.value)throw new Error("Please call `useProvideRoomContext` on the appropriate parent component");return t}function p(e,t){return t.msg==="set_pin"?[t.trackReference]:t.msg==="clear_pin"?[]:{...e}}const[b,i]=u(e=>{const t=n.shallowRef(e);function r(o){t.value=p(t.value,o)}return{state:t,dispatch:r}}),T=e=>{const t=e?n.shallowRef(e):i();if(!t)throw Error("Tried to access PinContext context outside a PinContextProvider provider.");return t},[M,x]=u(e=>n.shallowRef(e)),[j,c]=u(e=>n.shallowRef(e));function I(){return c()}function W(e){const t=e?n.shallowRef(e):c();if(!t)throw Error("Tried to access LayoutContext context outside a LayoutContextProvider provider.");return t}function P(){return{pin:i(),widget:x()}}function O(e){return n.shallowRef(e)??P()}const[A,l]=u(e=>n.shallowRef(e));function _(){return l()}function D(e){const t=e?n.shallowRef(e):l();if(!t||!t.value)throw new Error("Please call `useProvideParticipantContext` on the appropriate parent component");return t}const[G,f]=u(e=>n.shallowRef(e));function q(){return f()}function V(e){const t=e?n.shallowRef(e):f();if(!t||!t.value)throw new Error("Please call `useTrackRefContextProvider` on the appropriate parent component");return t}exports.isClient=h;exports.pinReducer=p;exports.toArray=g;exports.tryOnMounted=E;exports.tryOnScopeDispose=v;exports.useCreateLayoutContext=P;exports.useEnsureCreateLayoutContext=O;exports.useEnsureLayoutContext=W;exports.useEnsureParticipant=D;exports.useEnsurePinContext=T;exports.useEnsureRoomContext=S;exports.useEnsureTrackRef=V;exports.useLayoutContext=c;exports.useMaybeLayoutContext=I;exports.useMaybeParticipantContext=_;exports.useMaybeRoomContext=k;exports.useMaybeTrackRefContext=q;exports.useParticipantContext=l;exports.usePinContext=i;exports.useProvideLayoutContext=j;exports.useProvideParticipantContext=A;exports.useProvidePinContext=b;exports.useProvideRoomContext=L;exports.useProvideWidgetContext=M;exports.useRoomContext=a;exports.useTrackRefContext=f;exports.useTrackRefContextProvider=G;exports.useWidgetContext=x;
|
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
};
|