Skip to content

docs: document synchronized sound-haptics API - #164

Open
piaskowyk wants to merge 1 commit into
feat/audio-haptics-syncfrom
docs/audio-haptics-sync
Open

docs: document synchronized sound-haptics API#164
piaskowyk wants to merge 1 commit into
feat/audio-haptics-syncfrom
docs/audio-haptics-sync

Conversation

@piaskowyk

Copy link
Copy Markdown
Member

What

Documents the new synchronized sound + haptics API across all five SDK pages (React Native, iOS, Android, Flutter, KMP).

Why

The feature (#162) added parsePatternWithSound / a sound field to the Pattern Composer, but the SDK docs didn't cover it. This adds reference docs so developers can discover and use it.

Changes

Per platform page (docs/src/content/docs/sdk/*.mdx):

  • React Native — a "Synchronized sound" subsection under usePatternComposer, the sound? field on the Pattern type, and a new Sound type (covering require() support and the dev-vs-release Metro URL caveat).
  • iOSparsePatternWithSound(hapticsData:uri:volume:offset:) method reference (Core Haptics audio event, bundle a local file, device-only).
  • AndroidparsePatternWithSound(hapticsData, sound) method + SoundData type (explicit .ogg for the audio-coupled path, otherwise the audio + generated-haptics fallback).
  • FlutterparsePatternWithSound(pattern, sound) method + Sound type.
  • KMPparsePatternWithSound(pattern, sound) method + SoundData type.

All pages document the shared rule: the format comes from the uri's extension, defaulting to .wav, so a bare name like beep resolves beep.wav on both platforms.

Base branch

Stacked on feat/audio-haptics-sync so the diff is docs-only. Retarget to main once the feature branch merges (or merge the feature first).

Verification

npx astro build in docs/ completes successfully — all five SDK pages build with no errors.

Add parsePatternWithSound / sound documentation to the React Native, iOS,
Android, Flutter, and KMP SDK pages: the new method/field, the Sound/SoundData
type, the .wav default resolution, and the Android explicit-.ogg coupled path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant