{"_id":"0.1.0-alpha.14","name":"0.1.0-alpha.14","dist-tags":{"alpha":"0.1.0","latest":"0.1.0"},"versions":{"0.1.0":{"name":"0.1.0-alpha.14","version":"0.1.0","description":"Vroom Core SDK - Platform-agnostic RTC abstraction layer","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./react-native":{"types":"./dist/react-native.d.ts","import":"./dist/react-native.js","default":"./dist/react-native.js"}},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit","clean":"rm -rf dist","test":"vitest run","test:watch":"vitest"},"dependencies":{"fast-text-encoding":"^1.0.6","livekit-client":"2.16.1"},"peerDependencies":{"@livekit/react-native":"^2.10.1","@livekit/react-native-webrtc":"^144.0.0"},"peerDependenciesMeta":{"@livekit/react-native":{"optional":true},"@livekit/react-native-webrtc":{"optional":true}},"devDependencies":{"@livekit/react-native":"^2.10.1","@livekit/react-native-webrtc":"^144.0.0","typescript":"^5.9.3","vitest":"^4.1.7"},"gitHead":"64f9f0f8a96c289bebaaa83fd2644f2a4ebad8cb","_id":"0.1.0-alpha.14@0.1.0","_nodeVersion":"20.19.3","_npmVersion":"11.11.1","dist":{"integrity":"sha512-2tHH8a9YobmPO6b0xsh4sjSPMqZe66ZMBhLF4z+Ff00agvt8zv0yS485ZEeDD4Ve39GiFBlzqpftEkF+zSHg+w==","shasum":"6357007ef0c935cddb510efe4a727d94c45a70d3","tarball":"https://registry.npmjs.org/0.1.0-alpha.14/-/0.1.0-alpha.14-0.1.0.tgz","fileCount":198,"unpackedSize":379487,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDII2cHoTPk22Ddxry1ZE5B2+qe77N9ECzobS+Bw8AvKAiB+uBMo3JtasHSG6jd4tvBijayJ3lnI4S7Q+d08jk0GnQ=="}]},"_npmUser":{"name":"waitaya.buc","email":"waitaya.buc@truedigital.com"},"directories":{},"maintainers":[{"name":"waitaya.buc","email":"waitaya.buc@truedigital.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/0.1.0-alpha.14_0.1.0_1780033618296_0.9444558515417549"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-29T05:46:58.095Z","0.1.0":"2026-05-29T05:46:58.431Z","modified":"2026-05-29T05:46:58.671Z"},"maintainers":[{"name":"waitaya.buc","email":"waitaya.buc@truedigital.com"}],"description":"Vroom Core SDK - Platform-agnostic RTC abstraction layer","readme":"# Vroom Client JS\n\nPlatform-agnostic Core SDK for building real-time communication experiences.\n\n## Features\n\n- **Simple API** - Initialize once, connect to rooms with a single call\n- **Auto Token Exchange** - SDK handles authentication automatically\n- **Type-Safe** - Full TypeScript support\n- **Production Ready** - Auto-reconnect and error handling built-in\n\n## Installation\n\n```bash\nnpm install @vroom/client-js\n```\n\n### React Native\n\nWebRTC globals are initialized automatically inside `Vroom.connect()` — no manual polyfill setup required.\n\nFor RN-specific helpers (e.g., `RTCView` for rendering remote video), use the dedicated subpath:\n\n```typescript\nimport { RTCView, MediaStream } from '@vroom/client-js/react-native'\n```\n\n#### Required peer dependencies\n\n```bash\nnpm install @livekit/react-native @livekit/react-native-webrtc\n```\n\nThen on iOS, run `pod install`.\n\n## Quick Start\n\n```typescript\nimport { Vroom, SessionEvent } from '@vroom/client-js'\n\n// 1. Initialize (once at app startup)\nawait Vroom.init({ apiKey: 'your-api-key' })\n\n// 2. Connect to room\nconst session = await Vroom.connect({\n  roomName: 'meeting-123',\n  user: { id: 'user-1', displayName: 'Alice', role: 'host' },\n  type: 'group',\n  media: { audio: true, video: true },\n  eventHandlers: {\n    [SessionEvent.ParticipantJoined]: ({ participant }) => {\n      console.log(`${participant.displayName} joined`)\n    },\n    [SessionEvent.TrackAdded]: ({ track }) => {\n      if (track.mediaStreamTrack) {\n        videoElement.srcObject = new MediaStream([track.mediaStreamTrack])\n      }\n    }\n  }\n})\n\n// 3. Control media\nsession.disableMic()\nsession.enableCamera()\n\n// 4. Disconnect\nawait session.disconnect()\n```\n\n## API Reference\n\n### Vroom\n\n| Method | Description |\n|--------|-------------|\n| `init(config)` | Initialize SDK with API key |\n| `connect(params)` | Connect to room |\n| `reset()` | Reset SDK state |\n\n### Session\n\n| Method | Description |\n|--------|-------------|\n| `enableMic()` / `disableMic()` | Toggle microphone |\n| `enableCamera()` / `disableCamera()` | Toggle camera |\n| `switchDevice(options)` | Switch audio/video input or output device |\n| `getActiveDevice(kind)` | Get currently active device ID |\n| `getParticipants()` | Get all participants |\n| `room` | Room info (`name`, `sid`, `createdAt`) — immutable for the connection |\n| `disconnect()` | Disconnect from room |\n| `on(event, handler)` | Add event listener |\n\n### Events\n\n| Event | Description |\n|-------|-------------|\n| `SessionEvent.Connected` | Connected to room |\n| `SessionEvent.Disconnected` | Disconnected from room |\n| `SessionEvent.ParticipantJoined` | Participant joined |\n| `SessionEvent.ParticipantLeft` | Participant left |\n| `SessionEvent.TrackAdded` | Track published |\n| `SessionEvent.TrackRemoved` | Track unpublished |\n| `SessionEvent.Error` | Error occurred |\n\n## Error Handling\n\n```typescript\ntry {\n  await Vroom.connect({ ... })\n} catch (error) {\n  if (error.code === 'E_INVALID_API_KEY') {\n    // Handle invalid API key\n  }\n}\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-02602940f70b65efdcd21eef2b79caaa"}