# @rtcbase/rtcbase

> The official JavaScript SDK for RtcBase.

Latest version **1.7.0-rc1** (published 2022-01-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rtcbase/rtcbase
pnpm add @rtcbase/rtcbase
yarn add @rtcbase/rtcbase
bun add @rtcbase/rtcbase
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.7.0-rc1 |
| Published | 2022-01-20 |
| First published | 2021-09-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 33.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | RtcBase |
| Maintainers | rtcbase |
| Keywords | webrtc, video, monitoring, analytics |

## Links

- npm: https://www.npmjs.com/package/@rtcbase/rtcbase
- npm.io page: https://npm.io/package/@rtcbase/rtcbase

## Dependencies (1)

- [ua-parser-js](https://npm.io/package/ua-parser-js.md) ^1.0.2

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.7.0-rc1 (latest) — 2022-01-20
- 1.6.0-rc-1 — 2022-01-14
- 1.5.1 — 2022-01-12
- 1.5.0 — 2022-01-11
- 1.0.0 — 2021-11-22
- 0.4.1 — 2021-10-05
- 0.3.0 — 2021-10-04
- 0.2.1 — 2021-09-30

## README

# RtcBase

The official JavaScript SDK for [RtcBase](https://rtcbase.com/).

## Installation

```bash
npm install --save @rtcbase/rtcbase
```

## Usage

```js
import RtcBase from "@rtcbase/rtcbase";

// Start data collection
RtcBase.init(YOUR_APP_ID);

// Identify the user with unique id and optional traits
RtcBase.identify(userId, {
    name: "Example User",
    email: "user@example.com",
});

// Add more traits later
RtcBase.identify({
    conferenceId: "9c563e15-cfdd-4966-96fc-b25c88b47ec6",
});

// Identify track received from other confrence participant
// trackId - id of MediaStreamTrack
// otherUserId - unique user id of conference participant who is the source of tracks' data
RtcBase.identifyTrack(trackId, otherUserId);

// Start a new RtcBase monitoring session
RtcBase.restartSession();
```

---
_Source: https://npm.io/package/@rtcbase/rtcbase · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
