audiobits 0.1.1 → 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 CHANGED
@@ -1,5 +1,11 @@
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
+
3
9
  ## 0.1.1
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -7,14 +7,15 @@ Prerelease verification target: current Chromium. Other browsers and operating
7
7
  systems are unverified and deliberately deferred. Maintainer listening acceptance for the
8
8
  unchanged sound definitions is recorded separately.
9
9
 
10
- ## Install
10
+ ## Quick start
11
11
 
12
12
  ```sh
13
13
  npm install audiobits
14
14
  ```
15
15
 
16
- Use a browser bundler and call `play()` directly from a gesture handler. Surface rejection
17
- with `void play().catch(showError)` and retry from a fresh gesture.
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
- export async function play() {
26
- await audio.start();
27
- sound.play();
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
- Bind `play()` to a button click (`void play().catch(showError)`).
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
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "packageVersion": "0.1.1",
2
+ "packageVersion": "0.1.2",
3
3
  "schemaVersion": 1,
4
4
  "status": "stable",
5
5
  "recipe": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "audiobits",
3
- "version": "0.1.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
6
  "repository": {
package/skill/SKILL.md CHANGED
@@ -11,7 +11,9 @@ package version and read `audiobits/capabilities.json` and
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
- Use public imports from `audiobits` and `audiobits/recipes`. Create engines and
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.