Skip to content

docs(website): add useMicrophone hook documentation#199

Open
oddFEELING wants to merge 1 commit into
childrentime:mainfrom
oddFEELING:pr/use-microphone-docs
Open

docs(website): add useMicrophone hook documentation#199
oddFEELING wants to merge 1 commit into
childrentime:mainfrom
oddFEELING:pr/use-microphone-docs

Conversation

@oddFEELING
Copy link
Copy Markdown
Contributor

Follow-up to #198 (the useMicrophone hook). Adds the documentation that was deliberately deferred from that PR so the hook PR could be reviewed on its own.

Summary

  • Docs pagedocs/browser/useMicrophone.mdx plus docs-zh-hans/ and docs-zh-hant/ translations. Each has a single interactive tsx live demo covering the full flow: open/close the mic, an animated input-level meter, record/stop, pause/resume, and an <audio> element for playback.
  • API referencewebsite-docusaurus/api/useMicrophone-README*.md for the three locales, generated via pnpm gend from the hook's interface.ts JSDoc. The %%API%% marker on the docs page picks these up.
  • Hook registry — entry added to scripts/hook-registry.json under the browser category so blog posts can link to the canonical URL.
  • llms.txt / llms-full.txt updated by the website build to include the new hook (113 → 114).

Verified locally

  • cd packages/website-astro && pnpm build — all 462 pages build, including /browser/usemicrophone/ and both zh locales.
  • Ran the dev server and exercised the live demo in a browser: mic open/close, level meter, record/stop, pause/resume, and clip playback all work.
  • The %%API%% marker resolves to the generated options table.
  • eslint . clean.

Canonical URL: https://reactuse.com/browser/usemicrophone/

Add the docs page for useMicrophone in all three locales, the
generated API reference, and a hook-registry entry.

- docs/browser/useMicrophone.mdx (+ zh-Hans, zh-Hant) with an
  interactive demo covering stream, level meter, and recording
- website-docusaurus/api/useMicrophone-README*.md from `pnpm gend`
- scripts/hook-registry.json entry under the browser category
@oddFEELING
Copy link
Copy Markdown
Contributor Author

@childrentime , useMicrophone docs are ready.

Please check that the Chinese docs are correct. I wrote in english and used AI to translate.

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