audiobits 0.1.0 → 0.1.2
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/CHANGELOG.md +12 -0
- package/README.md +17 -20
- package/dist/capabilities.json +1 -1
- package/package.json +6 -1
- package/skill/SKILL.md +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# audiobits
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7f792f9: Clarify npm installation and the minimal confirmation-sound quick start in the shipped README and Skill, with nearby browser gesture and lifecycle guidance.
|
|
8
|
+
|
|
9
|
+
## 0.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Correct stale unpublished-package wording and document registry installation with `npm install audiobits`. Runtime behavior is unchanged.
|
|
14
|
+
|
|
3
15
|
## 0.1.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
# AudioBits
|
|
2
2
|
|
|
3
|
-
AudioBits
|
|
3
|
+
AudioBits is available on npm as `audiobits`. It includes confirmation, impact, thruster, tactile click, gentle rejection,
|
|
4
4
|
glass notification, whoosh and power-up; schema-1 recipes; play/live controls; seeded variation; bounded
|
|
5
5
|
voices; bus gain, mute and routing; native output taps; and explicit lifecycle APIs.
|
|
6
6
|
Prerelease verification target: current Chromium. Other browsers and operating
|
|
7
7
|
systems are unverified and deliberately deferred. Maintainer listening acceptance for the
|
|
8
|
-
unchanged sound definitions is recorded separately.
|
|
9
|
-
and the npm identifier remains `audiobits`.
|
|
8
|
+
unchanged sound definitions is recorded separately.
|
|
10
9
|
|
|
11
|
-
##
|
|
10
|
+
## Quick start
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
```sh
|
|
13
|
+
npm install audiobits
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Use a browser bundler. Create the engine and sound once; run the final two lines
|
|
17
|
+
inside a user gesture handler, such as a button click. Call `audio.start()`
|
|
18
|
+
directly in that handler and await it before playback.
|
|
18
19
|
|
|
19
20
|
```ts
|
|
20
21
|
import { createAudio } from "audiobits";
|
|
@@ -22,19 +23,15 @@ import { confirmation } from "audiobits/recipes";
|
|
|
22
23
|
|
|
23
24
|
const audio = createAudio();
|
|
24
25
|
const sound = audio.sound(confirmation);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
export function stop() {
|
|
30
|
-
audio.stopAll({ tails: "cut" });
|
|
31
|
-
}
|
|
32
|
-
export async function dispose() {
|
|
33
|
-
await audio.dispose();
|
|
34
|
-
}
|
|
26
|
+
|
|
27
|
+
await audio.start();
|
|
28
|
+
sound.play();
|
|
35
29
|
```
|
|
36
30
|
|
|
37
|
-
|
|
31
|
+
Surface activation failures and retry from a fresh gesture. Use
|
|
32
|
+
`audio.stopAll({ tails: "cut" })` to stop playback and `await audio.dispose()`
|
|
33
|
+
when the host is removed. See the production lifecycle example below for
|
|
34
|
+
hiding and navigation.
|
|
38
35
|
|
|
39
36
|
## Production lifecycle
|
|
40
37
|
|
package/dist/capabilities.json
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "audiobits",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Procedural browser audio: versioned recipes, live controls, managed voices and buses.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/joacod/audiobits.git",
|
|
9
|
+
"directory": "packages/audiobits"
|
|
10
|
+
},
|
|
6
11
|
"type": "module",
|
|
7
12
|
"sideEffects": false,
|
|
8
13
|
"files": [
|
package/skill/SKILL.md
CHANGED
|
@@ -5,13 +5,15 @@ description: Integrate AudioBits procedural sounds into a browser application, i
|
|
|
5
5
|
|
|
6
6
|
# AudioBits integration
|
|
7
7
|
|
|
8
|
-
This guide ships with
|
|
8
|
+
This guide ships with the `audiobits` npm package. Confirm the installed
|
|
9
9
|
package version and read `audiobits/capabilities.json` and
|
|
10
10
|
`audiobits/schema.json` before choosing primitives. Package metadata describes
|
|
11
11
|
shipped behavior, not registry availability. Prerelease verification target: current Chromium. Other browsers and operating
|
|
12
12
|
systems are unverified and deliberately deferred.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Install with `npm install audiobits` and use a browser bundler. Follow the
|
|
15
|
+
[package quick start](../README.md#quick-start) to play the bundled `confirmation`
|
|
16
|
+
recipe with public imports from `audiobits` and `audiobits/recipes`. Create engines and
|
|
15
17
|
sounds without browser activation, then invoke `start()` synchronously inside
|
|
16
18
|
a user gesture and await it before `play()`. Surface failures and allow a fresh
|
|
17
19
|
gesture retry. Never queue playback across Stop, hiding, or disposal.
|