@conference-kit/vue 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +58 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # @conference-kit/vue
2
+
3
+ Vue 3 composition utilities and signaling helper for building peer-to-peer mesh calls.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @conference-kit/vue
9
+ ```
10
+
11
+ Peer deps: Vue 3.4+.
12
+
13
+ ## What it provides
14
+
15
+ - `useMeshRoom(options)`: manage local media, roster, participants, and signaling for a mesh room.
16
+ - `SignalingClient`: minimal WebSocket client for presence/signal/broadcast/control messages.
17
+
18
+ `options` include `peerId`, `room`, `signalingUrl`, `mediaConstraints`, `rtcConfig`, `trickle`, `autoReconnect`, and feature toggles (e.g., `enableDataChannel`).
19
+
20
+ ## Quick example
21
+
22
+ ```vue
23
+ <script setup lang="ts">
24
+ import { computed } from "vue";
25
+ import { useMeshRoom } from "@conference-kit/vue";
26
+
27
+ const peerId = "peer-1";
28
+ const mesh = useMeshRoom({
29
+ peerId,
30
+ room: "lobby",
31
+ signalingUrl: "ws://localhost:8787",
32
+ });
33
+
34
+ onMounted(() => mesh.requestStream());
35
+ onUnmounted(() => mesh.leave());
36
+
37
+ const peers = computed(() => mesh.participants.value);
38
+ </script>
39
+
40
+ <template>
41
+ <div>
42
+ <button @click="mesh.requestStream">Request media</button>
43
+ <div v-for="p in peers" :key="p.id">
44
+ {{ p.id }} ({{ p.connectionState }})
45
+ </div>
46
+ </div>
47
+ </template>
48
+ ```
49
+
50
+ ## Signaling
51
+
52
+ `SignalingClient` emits `presence`, `signal`, `broadcast`, and `control` events matching the server in `@conference-kit/signaling-server`. Use it directly if you need a custom flow outside `useMeshRoom`.
53
+
54
+ ## Build
55
+
56
+ ```bash
57
+ npm run build
58
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conference-kit/vue",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",