@mrksbnc/livekit-vue 0.0.0 → 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.
Files changed (87) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/livekit-vue.js +20559 -0
  3. package/dist/livekit-vue.umd.cjs +62 -0
  4. package/dist/src/assets/index.d.ts +0 -0
  5. package/dist/src/components/controls/TrackToggle.vue.d.ts +15 -0
  6. package/dist/src/components/controls/buttons.d.ts +4 -0
  7. package/dist/src/components/controls/index.d.ts +3 -0
  8. package/dist/src/components/controls/track_toggle.d.ts +12 -0
  9. package/dist/src/components/icons/ParticipantPlaceholderIcon.vue.d.ts +2 -0
  10. package/dist/src/components/icons/TrackIcon.vue.d.ts +7 -0
  11. package/dist/src/components/index.d.ts +3 -0
  12. package/dist/src/components/participant/audio_track.d.ts +7 -0
  13. package/dist/src/composables/index.d.ts +37 -0
  14. package/dist/src/composables/private/useObservableState.d.ts +8 -0
  15. package/dist/src/composables/useAudioPlayback.d.ts +11 -0
  16. package/dist/src/composables/useClearPinButton.d.ts +5 -0
  17. package/dist/src/composables/useConnectionQualityIndicator.d.ts +10 -0
  18. package/dist/src/composables/useConnectionState.d.ts +3 -0
  19. package/dist/src/composables/useDataChannel.d.ts +15 -0
  20. package/dist/src/composables/useDisconnectButton.d.ts +5 -0
  21. package/dist/src/composables/useFacingMode.d.ts +10 -0
  22. package/dist/src/composables/useFocusToggle.d.ts +11 -0
  23. package/dist/src/composables/useGridLayout.d.ts +10 -0
  24. package/dist/src/composables/useIsEncrypted.d.ts +8 -0
  25. package/dist/src/composables/useIsMuted.d.ts +7 -0
  26. package/dist/src/composables/useIsRecording.d.ts +5 -0
  27. package/dist/src/composables/useIsSpeaking.d.ts +5 -0
  28. package/dist/src/composables/useLiveKitRoom.d.ts +8 -0
  29. package/dist/src/composables/useLocalParticipant.d.ts +16 -0
  30. package/dist/src/composables/useParticipantTile.d.ts +11 -0
  31. package/dist/src/composables/useParticipantTracks.d.ts +4 -0
  32. package/dist/src/composables/useParticipants.d.ts +7 -0
  33. package/dist/src/composables/usePersistentUserChoices.d.ts +16 -0
  34. package/dist/src/composables/usePinnedTracks.d.ts +4 -0
  35. package/dist/src/composables/useRemoteParticipant.d.ts +7 -0
  36. package/dist/src/composables/useRemoteParticipants.d.ts +7 -0
  37. package/dist/src/composables/useRoomInfo.d.ts +13 -0
  38. package/dist/src/composables/useSortedParticipants.d.ts +3 -0
  39. package/dist/src/composables/useSpeakingParticipants.d.ts +3 -0
  40. package/dist/src/composables/useStartAudio.d.ts +11 -0
  41. package/dist/src/composables/useStartVideo.d.ts +11 -0
  42. package/dist/src/composables/useToken.d.ts +10 -0
  43. package/dist/src/composables/useTrack.d.ts +3 -0
  44. package/dist/src/composables/useTrackByName.d.ts +3 -0
  45. package/dist/src/composables/useTrackMutedIndicator.d.ts +6 -0
  46. package/dist/src/composables/useTrackRefBySourceOrName.d.ts +4 -0
  47. package/dist/src/composables/useTrackSyncTime.d.ts +6 -0
  48. package/dist/src/composables/useTrackToggle.d.ts +21 -0
  49. package/dist/src/composables/useTrackVolume.d.ts +28 -0
  50. package/dist/src/composables/useTracks.d.ts +10 -0
  51. package/dist/src/composables/useVisualStableUpdate.d.ts +8 -0
  52. package/dist/src/context/index.d.ts +6 -0
  53. package/dist/src/context/layout.context.d.ts +28 -0
  54. package/dist/src/context/participant.context.d.ts +9 -0
  55. package/dist/src/context/pin.context.d.ts +26 -0
  56. package/dist/src/context/room.context.d.ts +9 -0
  57. package/dist/src/context/track_reference.context.d.ts +6 -0
  58. package/dist/src/context/widget.context.d.ts +7 -0
  59. package/dist/src/index.d.ts +3 -0
  60. package/dist/src/types/livekit_room.types.d.ts +68 -0
  61. package/dist/src/utils/room.utils.d.ts +1 -0
  62. package/package.json +10 -9
  63. package/dist/components.cjs +0 -2
  64. package/dist/components.cjs.map +0 -1
  65. package/dist/components.d.ts +0 -1
  66. package/dist/components.mjs +0 -213
  67. package/dist/components.mjs.map +0 -1
  68. package/dist/composables.cjs +0 -2
  69. package/dist/composables.cjs.map +0 -1
  70. package/dist/composables.d.ts +0 -1
  71. package/dist/composables.mjs +0 -913
  72. package/dist/composables.mjs.map +0 -1
  73. package/dist/contexts-BGR-EyiF.mjs +0 -227
  74. package/dist/contexts-BGR-EyiF.mjs.map +0 -1
  75. package/dist/index.cjs +0 -2
  76. package/dist/index.cjs.map +0 -1
  77. package/dist/index.d.ts +0 -1
  78. package/dist/index.mjs +0 -74
  79. package/dist/index.mjs.map +0 -1
  80. package/dist/shared-B72lPzrj.cjs +0 -2
  81. package/dist/shared-B72lPzrj.cjs.map +0 -1
  82. package/dist/shared-Bt-fJtlk.cjs +0 -2
  83. package/dist/shared-Bt-fJtlk.cjs.map +0 -1
  84. package/dist/shared-UqxyWhFA.cjs +0 -2
  85. package/dist/shared-UqxyWhFA.cjs.map +0 -1
  86. package/src/App.vue +0 -16
  87. package/src/main.ts +0 -6
@@ -0,0 +1,3 @@
1
+ export * from './components';
2
+ export * from './composables';
3
+ export * from './context';
@@ -0,0 +1,68 @@
1
+ import { AudioCaptureOptions, DisconnectReason, MediaDeviceFailure, Room, RoomConnectOptions, RoomOptions, ScreenShareCaptureOptions, VideoCaptureOptions } from 'livekit-client';
2
+ import { HTMLAttributes } from 'vue';
3
+ export type LiveKitRoomProps = {
4
+ /**
5
+ * URL to the LiveKit server.
6
+ * For example: `wss://<domain>.livekit.cloud`
7
+ * To simplify the implementation, `undefined` is also accepted as an intermediate value, but only with a valid string url can the connection be established.
8
+ */
9
+ serverUrl: string | undefined;
10
+ /**
11
+ * A user specific access token for a client to authenticate to the room.
12
+ * This token is necessary to establish a connection to the room.
13
+ * To simplify the implementation, `undefined` is also accepted as an intermediate value, but only with a valid string token can the connection be established.
14
+ *
15
+ * @see https://docs.livekit.io/cloud/project-management/keys-and-tokens/#generating-access-tokens
16
+ */
17
+ token: string | undefined;
18
+ /**
19
+ * Publish audio immediately after connecting to your LiveKit room.
20
+ * @defaultValue `false`
21
+ * @see https://docs.livekit.io/client-sdk-js/interfaces/AudioCaptureOptions.html
22
+ */
23
+ audio?: AudioCaptureOptions | boolean;
24
+ /**
25
+ * Publish video immediately after connecting to your LiveKit room.
26
+ * @defaultValue `false`
27
+ * @see https://docs.livekit.io/client-sdk-js/interfaces/VideoCaptureOptions.html
28
+ */
29
+ video?: VideoCaptureOptions | boolean;
30
+ /**
31
+ * Publish screen share immediately after connecting to your LiveKit room.
32
+ * @defaultValue `false`
33
+ * @see https://docs.livekit.io/client-sdk-js/interfaces/ScreenShareCaptureOptions.html
34
+ */
35
+ screen?: ScreenShareCaptureOptions | boolean;
36
+ /**
37
+ * If set to true a connection to LiveKit room is initiated.
38
+ * @defaultValue `true`
39
+ */
40
+ connect?: boolean;
41
+ /**
42
+ * Options for when creating a new room.
43
+ * When you pass your own room instance to this component, these options have no effect.
44
+ * Instead, set the options directly in the room instance.
45
+ *
46
+ * @see https://docs.livekit.io/client-sdk-js/interfaces/RoomOptions.html
47
+ */
48
+ options?: RoomOptions;
49
+ /**
50
+ * Define options how to connect to the LiveKit server.
51
+ *
52
+ * @see https://docs.livekit.io/client-sdk-js/interfaces/RoomConnectOptions.html
53
+ */
54
+ connectOptions?: RoomConnectOptions;
55
+ /**
56
+ * Optional room instance.
57
+ * By passing your own room instance you overwrite the `options` parameter,
58
+ * make sure to set the options directly on the room instance itself.
59
+ */
60
+ room?: Room;
61
+ simulateParticipants?: number | undefined;
62
+ htmlProps?: HTMLAttributes;
63
+ onConnected?: () => void;
64
+ onDisconnected?: (reason?: DisconnectReason) => void;
65
+ onError?: (error: Error) => void;
66
+ onMediaDeviceFailure?: (failure?: MediaDeviceFailure) => void;
67
+ onEncryptionError?: (error: Error) => void;
68
+ };
@@ -0,0 +1 @@
1
+ export declare function roomOptionsStringifyReplacer(key: string, val: unknown): unknown;
package/package.json CHANGED
@@ -1,25 +1,26 @@
1
1
  {
2
2
  "name": "@mrksbnc/livekit-vue",
3
- "version": "0.0.0",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
+ "license": "MIT",
5
6
  "exports": {
6
7
  ".": {
7
- "types": "./dist/index.d.ts",
8
- "import": "./dist/index.mjs",
9
- "require": "./dist/index.cjs"
8
+ "types": "./dist/src/index.d.ts",
9
+ "import": "./dist/livekit-vue.js",
10
+ "require": "./dist/livekit-vue.umd.cjs"
10
11
  },
11
12
  "./index.css": {
12
13
  "import": "./dist/index.css",
13
14
  "require": "./dist/index.css"
14
15
  },
15
16
  "./composables": {
16
- "types": "./dist/composables.d.ts",
17
- "import": "./dist/composables.mjs",
18
- "require": "./dist/composables.cjs"
17
+ "import": "./dist/composables.js",
18
+ "require": "./dist/composables.umd.cjs"
19
19
  }
20
20
  },
21
- "main": "dist/index.cjs",
22
- "module": "dist/index.mjs",
21
+ "main": "dist/livekit-vue.umd.cjs",
22
+ "module": "dist/livekit-vue.js",
23
+ "types": "dist/src/index.d.ts",
23
24
  "files": [
24
25
  "dist",
25
26
  "src"
@@ -1,2 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"components.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export { }
@@ -1,213 +0,0 @@
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
@@ -1 +0,0 @@
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;AAAA,EACnB,gBAAgB;AAAA,EAChB,OAAO;AAAA,EACP,SAAS;AACX;AAEO,SAASC,EAAOC,GAAMC,GAAQ;AACnC,SAAQC,EAAU,GAAIC,EAAoB,OAAOL,GAAYG,EAAO,CAAC,MAAMA,EAAO,CAAC,IAAI;AAAA,IACrFG,EAAoB,QAAQ,EAAE,GAAG,mEAAoE,GAAE,MAAM,EAAE;AAAA,IAC/GA,EAAoB,QAAQ,EAAE,GAAG,uEAAwE,GAAE,MAAM,EAAE;AAAA,EACvH,EAAI;AACJ;AACA,MAAeC,IAAA,EAAE,QAAQN,EAAM,GCnBzBD,IAAa;AAAA,EACjB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,OAAO;AAAA,EACP,SAAS;AACX;AAEO,SAASC,EAAOC,GAAMC,GAAQ;AACnC,SAAQC,EAAU,GAAIC,EAAoB,OAAOL,GAAYG,EAAO,CAAC,MAAMA,EAAO,CA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;;;;;;;;;;;;;;;;;;;;ACpCK,UAAAG,IAAcC,EAFNN,CAE6B,GAErC,EAAE,aAAAO,GAAa,SAAAC,MAAYC,EAAOJ,CAAW,GAE7CK,IAAWC,EAAI,EAAK;AAE1B,WAAAC,EAAU,MAAM;AACd,MAAAF,EAAS,QAAQ;AAAA,IAAA,CAClB;;;;;;;;;ICvBKxB,IAAa;AAAA,EACjB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,SAAS;AACX;AAEO,SAASC,EAAOC,GAAMC,GAAQ;AACnC,SAAQC,EAAU,GAAIC,EAAoB,OAAOL,GAAYG,EAAO,CAAC,MAAMA,EAAO,CAAC,IAAI;AAAA,IACrFG,EAAoB,QAAQ;AAAA,MAC1B,MAAM;AAAA,MACN,GAAG;AAAA,IACJ,GAAE,MAAM,EAAE;AAAA,EACf,EAAI;AACJ;AACA,MAAeqB,IAAA,EAAE,QAAQ1B,EAAM;;;;;;"}
@@ -1,2 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"composables.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export { }