audio-orchestration-bbcat-js 0.1.0-dev.1
Install from the command line:
Learn more about npm packages
$ npm install @bbc/audio-orchestration-bbcat-js@0.1.0-dev.1
Install via package.json:
"@bbc/audio-orchestration-bbcat-js": "0.1.0-dev.1"
About this version
This package provides components for parsing MPEG-DASH manifests and playing DASH audio streams using the WebAudio API.
NB: This is a legacy approach originally written for early WebAudio experiments at the BBC, and still in our core audio orchestration library. It is not the current recommended approach for playing back DASH media, and likely not useful outside the context of this repository.
The original bbcat-js library was written by Matt Paradis, Craig Wright, and Chris Pike of BBC Research and Development.
import bbcat from '@bbc/audio-orchestration-bbcat-js';
const { ManifestLoader, ManifestParser, DashSourceNode } = bbcat.dash;
this.manifestLoader = new ManifestLoader();
this.manifestParser = new ManifestParser();
const context = new AudioContext({ sampleRate: 48000 });
const play = async (manifestUrl) => {
const manifestBlob = await manifestLoader.load(manifestUrl);
const manifest = await manifestParser.parse(manifestBlob);
const source = new DashSourceNode(context, manifest);
await source.prime(0);
source.connect(context.destination);
source.start(context.currentTime);
};
Build the library in development mode, watching for changes:
npm run dev
Build the minified production library:
npm run build
This produces a dist/bbcat.js
bundle that exports the core
and dash
components.
Run the test suite in Chrome and Firefox:
npm run test:browser
The code is commented, and HTML documentation can be built using npm run doc
and then found in doc/index.html
.
@bbc/audio-orchestration-bbcat-js Copyright (C) 2022 BBC R&D
See the LICENSE file for terms applicable to this package, and the top-level Readme file for further information.
Details
- audio-orchestration-bbcat-js
- bbc
- over 2 years ago
- GPL-3.0-only
- 9 dependencies
Assets
- audio-orchestration-bbcat-js-0.1.0-dev.1-npm.tgz
Download activity
- Total downloads 1
- Last 30 days 0
- Last week 0
- Today 0