@nerimity/solid-opus-media-recorder
v1.0.1
Published
Opus ogg mic recorder to blob
Downloads
87
Readme
@nerimity/solid-opus-media-recorder
Opus ogg mic recorder to blob
Quick start
Install it:
npm i @nerimity/solid-opus-media-recorder
# or
yarn add @nerimity/solid-opus-media-recorder
# or
pnpm add @nerimity/solid-opus-media-recorder
Important
Before using this library, make sure to create a seperate init.ts
file and import it from your main/index.ts.
// init.ts
window.global ||= window;
// index/main.ts
import './init';
Use it:
import { useMicRecorder } from '@nerimity/solid-opus-media-recorder'
const App = () => {
const {record, stop} = useMicRecorder();
const onRecordClick = async () => {
console.log("recording...")
const blob = await record();
console.log("recorded", blob)
}
return (
<div>
<button onClick={onRecordClick}>Record</button>
<button onClick={stop}>Stop</button>
</div>
)
}
export default App