1.0.2 ā€¢ Published 1 year ago

react-use-microphone-volume-hook v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Welcome to react-use-microphone-volume-hook šŸ‘‹

Version

A React hook to subscribe to microphone volume changes

šŸ  Homepage

āœØ Demo

Install

yarn install react-use-microphone-volume-hook
npm install react-use-microphone-volume-hook

Usage (Snippet)

"use strict";

import useMicrophoneVolume from "react-use-microphone-volume-hook";

// use hook with manual volume tracking
const [volume, { startTrackingMicrophoneVolume, stopTrackingMicrophoneVolume }] = useMicrophoneVolume();

// use hook with auto volume tracking
const [volume, { startTrackingMicrophoneVolume, stopTrackingMicrophoneVolume }] = useMicrophoneVolume({ autoStart: true });

// stop volume tracking
stopTrackingMicrophoneVolume(); // returns true on success, false on error

// manually start volume tracking
startTrackingMicrophoneVolume(); // returns true on success, false on error

// use volume
<div>Volume: {volume} </div>;

Please check here for a sample usage

Author

šŸ‘¤ Emmanuel Ibikunle

Show your support

Give a ā­ļø if this project helped you!

License

This software is released under the MIT License.

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago