# acquire-webrtc

> **_`P2P Flow (step 1-8 below)`_** ![picture 1](images/6f8378b8fe23e0ad63351d58079db83cc337e9795bbcba49b91f6ef0515fff63.png)

Latest version **0.3.0** (published 2021-12-22) · 0 weekly downloads

## Install

```sh
npm install acquire-webrtc
pnpm add acquire-webrtc
yarn add acquire-webrtc
bun add acquire-webrtc
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2021-12-22 |
| First published | 2021-12-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 2 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | fzhang0723 |

## Links

- npm: https://www.npmjs.com/package/acquire-webrtc
- npm.io page: https://npm.io/package/acquire-webrtc

## Dependencies (13)

- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [react](https://npm.io/package/react.md) ^17.0.2
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.2
- [web-vitals](https://npm.io/package/web-vitals.md) ^1.1.2
- [simple-peer](https://npm.io/package/simple-peer.md) ^9.11.0
- [react-scripts](https://npm.io/package/react-scripts.md) ^4.0.3
- [kurento-client](https://npm.io/package/kurento-client.md) ^6.16.0
- [webrtc-adapter](https://npm.io/package/webrtc-adapter.md) ^8.1.0
- [socket.io-client](https://npm.io/package/socket.io-client.md) ^4.4.0
- [multistreamsmixer](https://npm.io/package/multistreamsmixer.md) ^1.2.2
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^11.2.7
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.16.1
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^12.8.3

## Recent versions

- 0.3.0 (latest) — 2021-12-22
- 0.2.0 — 2021-12-22
- 0.1.0 — 2021-12-22

## README

# **System Block Diagram**

**_`P2P Flow (step 1-8 below)`_**
![picture 1](images/6f8378b8fe23e0ad63351d58079db83cc337e9795bbcba49b91f6ef0515fff63.png)

![picture 3](images/41af64a8a6ac9a9b2a1be7b09058d524bfc4fbe429af71fa4c3bb5d6e6d50300.png)

[[Design Doc1]](https://docs.google.com/presentation/d/16jciP4aVSEJGvlFGgyiNxpWfMCDIToiMsydr5lKRjaU/edit#slide=id.g1066feef495_0_0)

[[POC Plan]](https://docs.google.com/presentation/d/1mqXBvoX8Ow-DoxDY2hEonCn2TcuuYa1UjNi2esC_q0c/edit#slide=id.g1070e4e29f0_0_0)

Http Server (Python)

- room and server allocation
- prestore offer

Collider (Go)

- exchange signaling message
- maintain `room` datastructure
  <br><br><br>

**_`New Recording Flow (no encryption or extra transcoding needed)`_**
![picture 2](images/35ba2c1ca12ab0c672addbacc9a19fe0d2315b544139ee22eff15a8fbc730957.png)

React Side

- Mixer of streams
- Send Kurento for recording
- S3 upload
- Lamda for S3 presigned-URL

<br><br><br>

# **Deploy or Start Guide**

use Systemctl for Python/Go backend server
<br><br><br>

# **Future DevOps**

Terrraform and K8S

<br><br><br>

# **React Component Prop/State/CSS/Store Spreadsheet**

[[React Tracker]](https://docs.google.com/spreadsheets/d/11rThXnNWrsaOW4jKzO9fc6kXO3k5h47w5iGQBVTPp1c/edit#gid=0)

# **Notes of some concerns**

1. Q: what is the buffer limits for the kurento recording?

   A: According to the documentation of kurento JSDoc, the kurento recorder endpoint will start storing into the file as soon as it get it. By default both AUDIO and VIDEO media types are expected, unless specified otherwise when invoking the connect method. Failing to provide both types, will result in RecorderEndpoint buffering the received media: it won't be written to the file until the recording is stopped. The recorder waits until all types of media start arriving, in order to synchronize them appropriately.

2. Q: Is the S3 uploading in real time?

   A: Yes, the S3 uploading is in real time

3. Q: How to hanlde the situation where the recording crash? Will it keep uploading to S3?

# **Setup kms in dev server**

1. use certbot generate certificates

2. make sure to combind fullchain.pem and key.pem into one pem file

3. when spin up the kms with the offical image, you need to bind certs, config files, and record storage location to it, an example is here:

```
docker run --rm \
-d \
--name kms \
--network host \
-v /tmp/recordings/:/tmp/recordings/  \
-v /cert/combind.pem:/cert/combind.pem \
-v /etc/kurento/kurento.conf.json:/etc/kurento/kurento.conf.json \
kurento/kurento-media-server:latest
```

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