
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-audio-streamer
Advanced tools
A React package for bidirectional audio streaming with WebSockets using a control button.
AudioStreamerButton
The AudioStreamerButton component is used for audio recording and streaming.
It is clickable and toggles the recording state.
This component connects to a WebSocket server to stream real-time audio.
Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
wsEndpoint | string | WebSocket URL for audio stream (required) | - |
onToggle | function | Callback function triggered when the button is clicked. It receives true when recording starts and false when it stops. | - |
sampleRate | number | Sample rate for audio recording (optional) | 24000 |
bufferSize | number | Buffer size for audio recording (optional) | 4800 |
React Example
Use the component in a React app as shown below:
import { AudioStreamerButton } from 'react-audio-streamer';
import { useState } from 'react';
const App = () => {
const [isRecording, setIsRecording] = useState(false);
const handleSetRecording = (isRecording) => {
console.log('Recording state:', isRecording);
setIsRecording(isRecording);
};
return (
<button
style={{
position: 'relative', // needs to be set relative
backgroundColor: isRecording ? 'red' : 'gray',
color: 'white',
padding: '10px 20px',
border: 'none',
borderRadius: '5px',
cursor: 'pointer',
}}
>
<AudioStreamerButton
wsEndpoint="ws://localhost:8766/realtime"
onToggle={handleSetRecording}
sampleRate={25000}
/>
{'microphone'}
</button>
);
};
export default App;
Caveats
AudioStreamerButton should always be inside a button with the position: relative style.FAQs
A React package for bidirectional audio streaming with WebSockets using a control button.
The npm package react-audio-streamer receives a total of 0 weekly downloads. As such, react-audio-streamer popularity was classified as not popular.
We found that react-audio-streamer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.