@observertc/samples-decoder
TypeScript icon, indicating that this package has built-in type declarations

2.2.12 • Public • Published

ObserveRTC Library for Decoding Samples

Monitor components provide samples in the ObserveRTC stack. This library is written to decode samples encoded by protobuf + object diffs (@observertc/samples-encoder).

API

SamplesDecoder

import { SamplesDecoder } from "@observertc/samples-decoder";
const decoder = new SamplesDecoder();

const encodedSamples = // assign the received encded sample

const samples = decoder.decodeFromBase64(encodedSamples);
// Or decode from bytes
const samples = decoder.decodeFromBytes(encodedSamples);

ClientSampleDecoder

import { ClientSampleDecoder } from "@observertc/samples-decoder";
const decoder = new ClientSampleDecoder();

const encodedSample = // assign the received encded sample

const clientSample = decoder.decodeFromBase64(encodedSample);
// Or decode from bytes
const clientSample = decoder.decodeFromBytes(encodedSamples);

SfuSampleDecoder

import { SfuSampleDecoder } from "@observertc/samples-decoder";
const decoder = new SfuSampleDecoder();

const encodedSample = // assign the received encded sample

const sfuSample = decoder.decodeFromBase64(encodedSample);
// Or decode from bytes
const sfuSample = decoder.decodeFromBytes(encodedSamples);

Package Sidebar

Install

npm i @observertc/samples-decoder

Weekly Downloads

28

Version

2.2.12

License

Apache-2.0

Unpacked Size

934 kB

Total Files

84

Last publish

Collaborators

  • pallab.gain
  • balazskreith