@mrksbnc/livekit-vue 0.0.0

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.
Files changed (105) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -0
  3. package/dist/components.cjs +2 -0
  4. package/dist/components.cjs.map +1 -0
  5. package/dist/components.d.ts +1 -0
  6. package/dist/components.mjs +213 -0
  7. package/dist/components.mjs.map +1 -0
  8. package/dist/composables.cjs +2 -0
  9. package/dist/composables.cjs.map +1 -0
  10. package/dist/composables.d.ts +1 -0
  11. package/dist/composables.mjs +913 -0
  12. package/dist/composables.mjs.map +1 -0
  13. package/dist/contexts-BGR-EyiF.mjs +227 -0
  14. package/dist/contexts-BGR-EyiF.mjs.map +1 -0
  15. package/dist/favicon.ico +0 -0
  16. package/dist/index.cjs +2 -0
  17. package/dist/index.cjs.map +1 -0
  18. package/dist/index.css +1 -0
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.mjs +74 -0
  21. package/dist/index.mjs.map +1 -0
  22. package/dist/shared-B72lPzrj.cjs +2 -0
  23. package/dist/shared-B72lPzrj.cjs.map +1 -0
  24. package/dist/shared-Bt-fJtlk.cjs +2 -0
  25. package/dist/shared-Bt-fJtlk.cjs.map +1 -0
  26. package/dist/shared-UqxyWhFA.cjs +2 -0
  27. package/dist/shared-UqxyWhFA.cjs.map +1 -0
  28. package/package.json +78 -0
  29. package/src/App.vue +16 -0
  30. package/src/assets/icons/chevron-down.svg +4 -0
  31. package/src/assets/icons/chevron-up.svg +4 -0
  32. package/src/assets/icons/frown.svg +7 -0
  33. package/src/assets/icons/heart.svg +6 -0
  34. package/src/assets/icons/mic-off.svg +8 -0
  35. package/src/assets/icons/mic.svg +7 -0
  36. package/src/assets/icons/phone-hang-up.svg +9 -0
  37. package/src/assets/icons/share-screen-off.svg +6 -0
  38. package/src/assets/icons/share-screen.svg +7 -0
  39. package/src/assets/icons/smile.svg +7 -0
  40. package/src/assets/icons/thumbs-down.svg +6 -0
  41. package/src/assets/icons/thumbs-up.svg +6 -0
  42. package/src/assets/icons/video-off.svg +5 -0
  43. package/src/assets/icons/video.svg +5 -0
  44. package/src/assets/index.ts +1 -0
  45. package/src/assets/placeholders/participant.svg +8 -0
  46. package/src/components/controls/TrackToggle.vue +27 -0
  47. package/src/components/controls/buttons.ts +5 -0
  48. package/src/components/controls/index.ts +3 -0
  49. package/src/components/controls/track_toggle.ts +13 -0
  50. package/src/components/icons/ParticipantPlaceholderIcon.vue +7 -0
  51. package/src/components/icons/TrackIcon.vue +55 -0
  52. package/src/components/index.ts +3 -0
  53. package/src/components/participant/AudioTrack.vue +17 -0
  54. package/src/components/participant/audio_track.ts +8 -0
  55. package/src/composables/index.ts +89 -0
  56. package/src/composables/private/useObservableState.ts +44 -0
  57. package/src/composables/useAudioPlayback.ts +42 -0
  58. package/src/composables/useClearPinButton.ts +41 -0
  59. package/src/composables/useConnectionQualityIndicator.ts +39 -0
  60. package/src/composables/useConnectionState.ts +21 -0
  61. package/src/composables/useDataChannel.ts +56 -0
  62. package/src/composables/useDisconnectButton.ts +28 -0
  63. package/src/composables/useFacingMode.ts +28 -0
  64. package/src/composables/useFocusToggle.ts +38 -0
  65. package/src/composables/useGridLayout.ts +44 -0
  66. package/src/composables/useIsEncrypted.ts +34 -0
  67. package/src/composables/useIsMuted.ts +56 -0
  68. package/src/composables/useIsRecording.ts +30 -0
  69. package/src/composables/useIsSpeaking.ts +23 -0
  70. package/src/composables/useLiveKitRoom.ts +219 -0
  71. package/src/composables/useLocalParticipant.ts +64 -0
  72. package/src/composables/useParticipantTile.ts +68 -0
  73. package/src/composables/useParticipantTracks.ts +36 -0
  74. package/src/composables/useParticipants.ts +25 -0
  75. package/src/composables/usePersistentUserChoices.ts +64 -0
  76. package/src/composables/usePinnedTracks.ts +16 -0
  77. package/src/composables/useRemoteParticipant.ts +42 -0
  78. package/src/composables/useRemoteParticipants.ts +27 -0
  79. package/src/composables/useRoomInfo.ts +42 -0
  80. package/src/composables/useSortedParticipants.ts +21 -0
  81. package/src/composables/useSpeakingParticipants.ts +22 -0
  82. package/src/composables/useStartAudio.ts +53 -0
  83. package/src/composables/useStartVideo.ts +53 -0
  84. package/src/composables/useToken.ts +40 -0
  85. package/src/composables/useTrack.ts +11 -0
  86. package/src/composables/useTrackByName.ts +11 -0
  87. package/src/composables/useTrackMutedIndicator.ts +34 -0
  88. package/src/composables/useTrackRefBySourceOrName.ts +39 -0
  89. package/src/composables/useTrackSyncTime.ts +32 -0
  90. package/src/composables/useTrackToggle.ts +113 -0
  91. package/src/composables/useTrackVolume.ts +268 -0
  92. package/src/composables/useTracks.ts +122 -0
  93. package/src/composables/useVisualStableUpdate.ts +57 -0
  94. package/src/context/index.ts +6 -0
  95. package/src/context/layout.context.ts +46 -0
  96. package/src/context/participant.context.ts +33 -0
  97. package/src/context/pin.context.ts +50 -0
  98. package/src/context/room.context.ts +31 -0
  99. package/src/context/track_reference.context.ts +29 -0
  100. package/src/context/widget.context.ts +17 -0
  101. package/src/index.css +1 -0
  102. package/src/index.ts +5 -0
  103. package/src/main.ts +6 -0
  104. package/src/types/livekit_room.types.ts +78 -0
  105. package/src/utils/room.utils.ts +9 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Bence Márkus
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.
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # livekit-vue
2
+
3
+ Vue implementation of the LiveKit componen-js library.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8
+
9
+ ## Type Support for `.vue` Imports in TS
10
+
11
+ TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
12
+
13
+ ## Customize configuration
14
+
15
+ See [Vite Configuration Reference](https://vite.dev/config/).
16
+
17
+ ## Project Setup
18
+
19
+ ```sh
20
+ pnpm install
21
+ ```
22
+
23
+ ### Compile and Hot-Reload for Development
24
+
25
+ ```sh
26
+ pnpm dev
27
+ ```
28
+
29
+ ### Type-Check, Compile and Minify for Production
30
+
31
+ ```sh
32
+ pnpm build
33
+ ```
34
+
35
+ ### Run Unit Tests with [Vitest](https://vitest.dev/)
36
+
37
+ ```sh
38
+ pnpm test:unit
39
+ ```
40
+
41
+ ### Lint with [ESLint](https://eslint.org/)
42
+
43
+ ```sh
44
+ pnpm lint
45
+ ```
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared-UqxyWhFA.cjs");exports.ParticipantPlaceholderIcon=e._sfc_main$1;exports.TrackIcon=e._sfc_main$2;exports.TrackToggle=e._sfc_main;
2
+ //# sourceMappingURL=components.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export { }
@@ -0,0 +1,213 @@
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 k, createCommentVNode as w, mergeProps as _, createVNode as x, resolveDynamicComponent as M } from "vue";
2
+ import "./contexts-BGR-EyiF.mjs";
3
+ import "@livekit/components-core";
4
+ import "rxjs";
5
+ import { Track as d } from "livekit-client";
6
+ import { useTrackToggle as y } from "./composables.mjs";
7
+ const b = {
8
+ xmlns: "http://www.w3.org/2000/svg",
9
+ width: "auto",
10
+ height: "auto",
11
+ fill: "none",
12
+ stroke: "currentColor",
13
+ "stroke-linecap": "round",
14
+ "stroke-linejoin": "round",
15
+ "stroke-width": "2",
16
+ class: "mic-off",
17
+ viewBox: "0 0 24 24"
18
+ };
19
+ function C(n, e) {
20
+ return o(), t("svg", b, e[0] || (e[0] = [
21
+ r("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),
22
+ r("path", { d: "M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23M12 19v4M8 23h8" }, null, -1)
23
+ ]));
24
+ }
25
+ const S = { render: C }, $ = {
26
+ xmlns: "http://www.w3.org/2000/svg",
27
+ width: "auto",
28
+ height: "auto",
29
+ fill: "none",
30
+ stroke: "currentColor",
31
+ "stroke-linecap": "round",
32
+ "stroke-linejoin": "round",
33
+ "stroke-width": "2",
34
+ class: "mic",
35
+ viewBox: "0 0 24 24"
36
+ };
37
+ function B(n, e) {
38
+ return o(), t("svg", $, e[0] || (e[0] = [
39
+ r("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3" }, null, -1),
40
+ r("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2M12 19v4M8 23h8" }, null, -1)
41
+ ]));
42
+ }
43
+ const V = { render: B }, T = {
44
+ xmlns: "http://www.w3.org/2000/svg",
45
+ width: "auto",
46
+ height: "auto",
47
+ fill: "none",
48
+ class: "share-screen-off",
49
+ viewBox: "0 0 24 24"
50
+ };
51
+ function q(n, e) {
52
+ return o(), t("svg", T, e[0] || (e[0] = [
53
+ r("path", {
54
+ fill: "currentColor",
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
+ }, null, -1)
57
+ ]));
58
+ }
59
+ const P = { render: q }, I = {
60
+ xmlns: "http://www.w3.org/2000/svg",
61
+ width: "auto",
62
+ height: "auto",
63
+ fill: "none",
64
+ class: "share-screen",
65
+ viewBox: "0 0 20 20"
66
+ };
67
+ function z(n, e) {
68
+ return o(), t("svg", I, e[0] || (e[0] = [
69
+ r("path", {
70
+ fill: "currentColor",
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
+ }, null, -1)
73
+ ]));
74
+ }
75
+ const H = { render: z }, j = {
76
+ xmlns: "http://www.w3.org/2000/svg",
77
+ width: "auto",
78
+ height: "auto",
79
+ fill: "none",
80
+ stroke: "currentColor",
81
+ "stroke-linecap": "round",
82
+ "stroke-linejoin": "round",
83
+ "stroke-width": "2",
84
+ class: "video-off",
85
+ viewBox: "0 0 24 24"
86
+ };
87
+ function O(n, e) {
88
+ return o(), t("svg", j, e[0] || (e[0] = [
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
+ ]));
91
+ }
92
+ const L = { render: O }, D = {
93
+ xmlns: "http://www.w3.org/2000/svg",
94
+ width: "auto",
95
+ height: "auto",
96
+ fill: "none",
97
+ stroke: "currentColor",
98
+ "stroke-linecap": "round",
99
+ "stroke-linejoin": "round",
100
+ "stroke-width": "2",
101
+ class: "video",
102
+ viewBox: "0 0 24 24"
103
+ };
104
+ function E(n, e) {
105
+ return o(), t("svg", D, e[0] || (e[0] = [
106
+ r("path", { d: "m23 7-7 5 7 5z" }, null, -1),
107
+ r("rect", {
108
+ width: "15",
109
+ height: "14",
110
+ x: "1",
111
+ y: "5",
112
+ rx: "2",
113
+ ry: "2"
114
+ }, null, -1)
115
+ ]));
116
+ }
117
+ const F = { render: E }, N = {
118
+ key: 6,
119
+ class: "track-icon__none"
120
+ }, A = /* @__PURE__ */ h({
121
+ __name: "TrackIcon",
122
+ props: {
123
+ source: {},
124
+ enabled: { type: Boolean }
125
+ },
126
+ setup(n) {
127
+ const e = n, s = m(() => {
128
+ switch (e.source) {
129
+ case d.Source.Camera:
130
+ return e.enabled ? "camera" : "camera-disabled";
131
+ case d.Source.Microphone:
132
+ return e.enabled ? "microphone" : "microphone-disabled";
133
+ case d.Source.ScreenShare:
134
+ return e.enabled ? "screen-share" : "screen-share-disabled";
135
+ default:
136
+ return "none";
137
+ }
138
+ }), l = m(() => (
139
+ /*tw*/
140
+ "track-icon w-4 h-4 flex items-center justify-center"
141
+ ));
142
+ return (p, u) => s.value === "camera" ? (o(), c(a(F), {
143
+ key: 0,
144
+ class: i(l.value)
145
+ }, null, 8, ["class"])) : s.value === "camera-disabled" ? (o(), c(a(L), {
146
+ key: 1,
147
+ class: i(l.value)
148
+ }, null, 8, ["class"])) : s.value === "microphone" ? (o(), c(a(V), {
149
+ key: 2,
150
+ class: i(l.value)
151
+ }, null, 8, ["class"])) : s.value === "microphone-disabled" ? (o(), c(a(S), {
152
+ key: 3,
153
+ class: i(l.value)
154
+ }, null, 8, ["class"])) : s.value === "screen-share" ? (o(), c(a(H), {
155
+ key: 4,
156
+ class: i(l.value)
157
+ }, null, 8, ["class"])) : s.value === "screen-share-disabled" ? (o(), c(a(P), {
158
+ key: 5,
159
+ class: i(l.value)
160
+ }, null, 8, ["class"])) : (o(), t("span", N));
161
+ }
162
+ }), R = { key: 0 }, oe = /* @__PURE__ */ h({
163
+ __name: "TrackToggle",
164
+ props: {
165
+ source: {},
166
+ showIcon: { type: Boolean },
167
+ initialState: { type: Boolean },
168
+ captureOptions: {},
169
+ publishOptions: {},
170
+ onChange: { type: Function },
171
+ onDeviceError: { type: Function },
172
+ customOnClickHandler: { type: Function }
173
+ },
174
+ setup(n) {
175
+ const s = y(n), { buttonProps: l, enabled: p } = g(s), u = f(!1);
176
+ return k(() => {
177
+ u.value = !0;
178
+ }), (v, Q) => u.value ? (o(), t("button", _({ key: 0 }, a(l), { class: "track-toggle" }), [
179
+ v.showIcon ? (o(), t("span", R, [
180
+ x(A, {
181
+ enabled: a(p),
182
+ source: v.source
183
+ }, null, 8, ["enabled", "source"])
184
+ ])) : w("", !0)
185
+ ], 16)) : w("", !0);
186
+ }
187
+ }), G = {
188
+ xmlns: "http://www.w3.org/2000/svg",
189
+ width: "auto",
190
+ height: "auto",
191
+ fill: "none",
192
+ viewBox: "0 0 320 320"
193
+ };
194
+ function J(n, e) {
195
+ return o(), t("svg", G, e[0] || (e[0] = [
196
+ r("path", {
197
+ fill: "currentColor",
198
+ 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"
199
+ }, null, -1)
200
+ ]));
201
+ }
202
+ const K = { render: J }, ne = /* @__PURE__ */ h({
203
+ __name: "ParticipantPlaceholderIcon",
204
+ setup(n) {
205
+ return (e, s) => (o(), c(M(a(K))));
206
+ }
207
+ });
208
+ export {
209
+ ne as ParticipantPlaceholderIcon,
210
+ A as TrackIcon,
211
+ oe as TrackToggle
212
+ };
213
+ //# sourceMappingURL=components.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.mjs","sources":["../src/assets/icons/mic-off.svg?component","../src/assets/icons/mic.svg?component","../src/assets/icons/share-screen-off.svg?component","../src/assets/icons/share-screen.svg?component","../src/assets/icons/video-off.svg?component","../src/assets/icons/video.svg?component","../src/components/icons/TrackIcon.vue","../src/components/controls/TrackToggle.vue","../src/assets/placeholders/participant.svg?component"],"sourcesContent":["import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"auto\",\n height: \"auto\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": \"2\",\n class: \"mic-off\",\n viewBox: \"0 0 24 24\"\n}\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _cache[0] || (_cache[0] = [\n _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),\n _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)\n ])))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"auto\",\n height: \"auto\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": \"2\",\n class: \"mic\",\n viewBox: \"0 0 24 24\"\n}\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _cache[0] || (_cache[0] = [\n _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),\n _createElementVNode(\"path\", { d: \"M19 10v2a7 7 0 0 1-14 0v-2M12 19v4M8 23h8\" }, null, -1)\n ])))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"auto\",\n height: \"auto\",\n fill: \"none\",\n class: \"share-screen-off\",\n viewBox: \"0 0 24 24\"\n}\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _cache[0] || (_cache[0] = [\n _createElementVNode(\"path\", {\n fill: \"currentColor\",\n 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\"\n }, null, -1)\n ])))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"auto\",\n height: \"auto\",\n fill: \"none\",\n class: \"share-screen\",\n viewBox: \"0 0 20 20\"\n}\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _cache[0] || (_cache[0] = [\n _createElementVNode(\"path\", {\n fill: \"currentColor\",\n 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\"\n }, null, -1)\n ])))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"auto\",\n height: \"auto\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": \"2\",\n class: \"video-off\",\n viewBox: \"0 0 24 24\"\n}\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _cache[0] || (_cache[0] = [\n _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)\n ])))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"auto\",\n height: \"auto\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": \"2\",\n class: \"video\",\n viewBox: \"0 0 24 24\"\n}\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _cache[0] || (_cache[0] = [\n _createElementVNode(\"path\", { d: \"m23 7-7 5 7 5z\" }, null, -1),\n _createElementVNode(\"rect\", {\n width: \"15\",\n height: \"14\",\n x: \"1\",\n y: \"5\",\n rx: \"2\",\n ry: \"2\"\n }, null, -1)\n ])))\n}\nexport default { render: render }","<template>\n <VideoSvg v-if=\"source === TrackIcon.Camera\" :class=\"trackIconClasses\" />\n <VideoOffSvg v-else-if=\"source === TrackIcon.CameraDisabled\" :class=\"trackIconClasses\" />\n <MicSvg v-else-if=\"source === TrackIcon.Microphone\" :class=\"trackIconClasses\" />\n <MicOffSvg v-else-if=\"source === TrackIcon.MicrophoneDisabled\" :class=\"trackIconClasses\" />\n <ScreenShareSvg v-else-if=\"source === TrackIcon.ScreenShare\" :class=\"trackIconClasses\" />\n <ScreenShareDisabledSvg\n v-else-if=\"source === TrackIcon.ScreenShareDisabled\"\n :class=\"trackIconClasses\"\n />\n <span v-else class=\"track-icon__none\" />\n</template>\n\n<script setup lang=\"ts\">\nimport MicOffSvg from '@/assets/icons/mic-off.svg?component';\nimport MicSvg from '@/assets/icons/mic.svg?component';\nimport ScreenShareDisabledSvg from '@/assets/icons/share-screen-off.svg?component';\nimport ScreenShareSvg from '@/assets/icons/share-screen.svg?component';\nimport VideoOffSvg from '@/assets/icons/video-off.svg?component';\nimport VideoSvg from '@/assets/icons/video.svg?component';\nimport { Track } from 'livekit-client';\nimport { computed } from 'vue';\n\nconst props = defineProps<{\n source: Track.Source;\n enabled: boolean;\n}>();\n\nenum TrackIcon {\n None = 'none',\n Camera = 'camera',\n CameraDisabled = 'camera-disabled',\n Microphone = 'microphone',\n MicrophoneDisabled = 'microphone-disabled',\n ScreenShare = 'screen-share',\n ScreenShareDisabled = 'screen-share-disabled',\n}\n\nconst source = computed<TrackIcon>(() => {\n switch (props.source) {\n case Track.Source.Camera:\n return props.enabled ? TrackIcon.Camera : TrackIcon.CameraDisabled;\n case Track.Source.Microphone:\n return props.enabled ? TrackIcon.Microphone : TrackIcon.MicrophoneDisabled;\n case Track.Source.ScreenShare:\n return props.enabled ? TrackIcon.ScreenShare : TrackIcon.ScreenShareDisabled;\n default:\n return TrackIcon.None;\n }\n});\n\nconst trackIconClasses = computed<string>(() => {\n return /*tw*/ 'track-icon w-4 h-4 flex items-center justify-center';\n});\n</script>\n","<template>\n <button v-if=\"isClient\" v-bind=\"buttonProps\" class=\"track-toggle\">\n <span v-if=\"showIcon\">\n <TrackIcon :enabled=\"enabled\" :source=\"source\" />\n </span>\n </button>\n</template>\n\n<script setup lang=\"ts\" generic=\"T extends ToggleSource\">\nimport { useTrackToggle } from '@/composables';\nimport type { ToggleSource } from '@livekit/components-core';\nimport { onMounted, ref, toRefs } from 'vue';\nimport TrackIcon from '../icons/TrackIcon.vue';\nimport type { TrackToggleProps } from './track_toggle';\n\nconst props = defineProps<TrackToggleProps<T>>();\n\nconst trackToggle = useTrackToggle<T>(props);\n\nconst { buttonProps, enabled } = toRefs(trackToggle);\n\nconst isClient = ref(false);\n\nonMounted(() => {\n isClient.value = true;\n});\n</script>\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"auto\",\n height: \"auto\",\n fill: \"none\",\n viewBox: \"0 0 320 320\"\n}\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _cache[0] || (_cache[0] = [\n _createElementVNode(\"path\", {\n fill: \"currentColor\",\n 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\"\n }, null, -1)\n ])))\n}\nexport default { render: render }"],"names":["_hoisted_1","render","_ctx","_cache","_openBlock","_createElementBlock","_createElementVNode","MicOffSvg","MicSvg","ScreenShareDisabledSvg","ScreenShareSvg","VideoOffSvg","VideoSvg","props","__props","source","computed","Track","trackIconClasses","trackToggle","useTrackToggle","buttonProps","enabled","toRefs","isClient","ref","onMounted","ParticipantPlaceholder"],"mappings":";;;;;;AAEA,MAAMA,IAAa;AAAA,EACjB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,mBAAmB;AA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EACf,EAAI;AACJ;AACA,MAAeqB,IAAA,EAAE,QAAQ1B,EAAM;;;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared-Bt-fJtlk.cjs"),s=require("./shared-B72lPzrj.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;
2
+ //# sourceMappingURL=composables.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composables.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export { }