Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
audio-stream
Advanced tools
Readme
Stream raw audio data from a MediaStream. Only works in modern browsers that support the Web Audio API.
npm install audio-stream
See the live recorder demo.
Use together with tools similar to browserify. The data is streamed as interleaved 32-bit floats ranging between -1 and 1.
var audio = require('audio-stream');
navigator.getUserMedia({
video: false,
audio: true
}, function(mediaStream) {
var stream = audio(mediaStream, {
channels: 1,
volume: 0.5
});
stream.on('header', function(header) {
// Wave header properties
});
stream.on('data', function(data) {
// Data is a Buffer instance (UInt8Array)
});
stream.on('end', function() {
// End is emitted when media stream has ended
});
setTimeout(function() {
mediaStream.stop();
}, 5000);
}, function() {
console.log('Failed to get media');
});
The constructor accepts number of channels and microphone volume as options.
stream.destroy([err])
Destroy the audio stream, releasing all associated resources. The media stream is not closed.
stream.suspend()
Suspend audio data capturing.
stream.restart()
Restart audio data capturing.
Currently Chrome lacks supports for capturing a remote stream sent using a peer connection. But works in Firefox.
// This only works in Firefox at the moment
peerConnection.onaddstream = function(e) {
var stream = audio(e.stream);
stream.on('data', function(data) {
});
};
FAQs
Stream raw audio data from a MediaStream
The npm package audio-stream receives a total of 5 weekly downloads. As such, audio-stream popularity was classified as not popular.
We found that audio-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.