@composy/audio-vue
@composy/audio-vue
Vue 3 adapter for @composy/audio-core.
Install
pnpm add @composy/audio-core @composy/audio-vue vue
Usage
<script setup lang="ts">
import { Audio } from '@composy/audio-vue'
</script>
<template>
<Audio
title="Meeting Recorder"
:recorder="{ quality: 'speech', maxDuration: 120 }"
:visualizer="{ type: 'timeline' }"
@record-stop="result => console.log(result.filename)"
/>
</template>
Component
Audio forwards the core manager options except container, and exposes:
start(),pause(),resume(),stop(),clear(),download()setVisualizerType(type)setMuted(muted),toggleMuted()listInputDevices(),setInputDevice(deviceId)getRecordResult()
Events
readypermission-grantedpermission-deniedstate-changerecord-startrecord-datarecord-pauserecord-resumerecord-stoprecord-clearmax-duration-reachedinput-devices-changemute-changemetricsdestroyerror
Styling
The host class is ldesign-audio-vue-host. The rendered core UI uses ldesign-audio* classes.
Default styling consumes packages/color variables like --ld-primary-500, --ld-bg-surface, and
--ld-text-primary, and packages/size variables like --ld-spacing-md, --ld-radius-lg, and
--ld-px-220.
Build
pnpm type-check
pnpm type-check:cjs
pnpm build
pnpm lint:check
Read APIs and initialization errors
useAudio() and the <Audio> expose API include getAudioBlob(), getAudioUrl(), and
getWaveformSamples(). The sample method returns a defensive copy. If Core construction fails,
init() returns null and writes the normalized exception to error.value instead of throwing
through the component tree.
Related Packages
Audio playback plugin for @linto-ai/transcript-ui — waveform, active-word highli...
Vue 3 audio player with waveform, repeat, speed control and A/B looping
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.0.2 | 3.5.32 | MIT | |
| 0.0.1 | ^3.5.32 | MIT |