React video player component that automatically disables video when there is no audio
Useful in one-many video conferencing settings such as classrooms or interactive presentations
This can be readily installed from npm
using
npm install automute
The component can then be included using <AutoMute />
Props for the component are
startListening
: External trigger to enable audio detection. Must for security/privacy reasons.showStats
: Show the associated current volume and the volume at end oftimeout
fftSize
: The window size for FFT used in volume detection (default - 256)timeout
: The interval time (in milliseconds) after which the video will be disabled if volume is below threshold (default - 4000 ms)threshold
: The value for the volume above which video is triggered (default - 20)muteOnlyAudio
: Enable to continuously transmit video. On disabling, video is transmitted only when audio detection is on
Please direct your queries to gpavanb1 for any questions.
MIT © gpavanb1