@waveform-playlist/playout 12.5.0 → 12.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
# @waveform-playlist/playout
|
|
2
2
|
|
|
3
|
-
Tone.js-based `PlayoutAdapter` for [`@waveform-playlist/engine`](https://www.npmjs.com/package/@waveform-playlist/engine) — drives playback, recording, and effects on a shared global audio context. Used by `@waveform-playlist/browser` (the React surface). For native Web Audio (no Tone.js), see `@dawcore/transport`.
|
|
3
|
+
Tone.js-based `PlayoutAdapter` for [`@waveform-playlist/engine`](https://www.npmjs.com/package/@waveform-playlist/engine) — drives playback, recording, and effects on a shared global Tone.js audio context. Used by `@waveform-playlist/browser` (the React surface). For native Web Audio (no Tone.js), see `@dawcore/transport`.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @waveform-playlist/playout
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires `tone` (`^15.0.0`) as a peer dependency — this package doesn't bundle Tone.js, so the version in your app is the one that runs. `@waveform-playlist/engine` is an optional peer; most consumers pull in both automatically via `@waveform-playlist/browser` rather than installing this package directly.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { createToneAdapter } from '@waveform-playlist/playout';
|
|
17
|
+
import { PlaylistEngine } from '@waveform-playlist/engine';
|
|
18
|
+
|
|
19
|
+
const adapter = createToneAdapter();
|
|
20
|
+
const engine = new PlaylistEngine({ adapter });
|
|
21
|
+
|
|
22
|
+
engine.setTracks(tracks); // ClipTrack[]
|
|
23
|
+
engine.play(0);
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`createToneAdapter()` eagerly creates the shared global Tone.js context before building its audio graph, so `adapter.audioContext` is guaranteed to be the same context the playout's nodes are on.
|
|
4
27
|
|
|
5
28
|
## Audio context is a standardized-audio-context ponyfill
|
|
6
29
|
|
|
@@ -19,3 +42,7 @@ await addRecordingWorkletModule((url) => ctx.audioWorklet.addModule(url));
|
|
|
19
42
|
```
|
|
20
43
|
|
|
21
44
|
If you genuinely need a native `AudioContext`, own it yourself via the web-components adapter surface (`@dawcore/*`), which uses native Web Audio rather than Tone.
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waveform-playlist/playout",
|
|
3
|
-
"version": "12.5.
|
|
3
|
+
"version": "12.5.1",
|
|
4
4
|
"description": "Playout engine for waveform-playlist using Tone.js",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"soundfont2": "^0.5.0",
|
|
46
|
-
"@waveform-playlist/core": "12.
|
|
46
|
+
"@waveform-playlist/core": "12.6.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@waveform-playlist/engine": ">=7.0.0",
|