@octra/media
v0.0.15
Published
This library offers classes that describes data related to media (e.g. SampleUnit class that describes one point in time of type sample with conversions to other time units) used by [Octra](https://github.com/IPS-LMU/octra). If you are looking for decodin
Downloads
106
Readme
@octra/media
This library offers classes that describes data related to media (e.g. SampleUnit class that describes one point in time of type sample with conversions to other time units) used by Octra. If you are looking for decoding and playback of audio files see @octra/web-media library.
Installation
ESM, CJS, TS definitions & UMD (optional)
npm install --save @octra/media
UMD Bundle (for Vanilla JS)
You have two options to install this package und use it as UMD:
a) Install via NPM and reference local files (no internet connection needed om production).
<script type="application/javascript" src="node_modules/@octra/media/index.umd.js"></script>
b) Reference remote file (internet connection needed on production).
<script type="application/javascript" src="https://unpkg.com/@octra/media/index.umd.js"></script>
Use
Import
ESM, Typescript
Import the classes and functions from @octra/media
. For example
import {SampleUnit} from "@octra/media";
const unit = new SampleUnit(123123, 22100);
UMD Bundle
All functions and classes are available via global scope OctraMedia
. For example:
/*
make sure that you have injected the umd bundle as described before.
*/
const validator = new OctraMedia.SampleUnit(123123, 22100);
API
You can find more information about classes and functions of @octra/media
here.