
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
media-core
Advanced tools
A Typescript code, based on MediaRecorder() API to get MediaRecorder.
If you want to see complete UI react voice recording you can use this package ( React Voice Recorder )
npm i media-core
OR
yarn add media-core
Recording audio sample.
import { IMedia, MediaCore } from 'media-core';
const mediaRecorder: MediaRecorder | null = null;
const getMedia = async (): void => {
const mediaConfig: IMedia = {
Constraints: {
audio: true
},
mediaRecorderOptions: {
mimeType: 'audio/webm'
}
}
try {
mediaRecorder = await MediaCore(mediaConfig);
} catch (e) {
// catch error
}
}
MediaCore
This function return MediaRecorder, you must pass config that use IMedia Interface, if this function can not return MediaRecorder instance it throw an error.
interface IErrorMessage {
id: number
message: string
}
For error id I use enum and I exported it.
enum ErrorEnum {
Security,
RejectPermission,
TypeSupport
}
MediaCoreConfig
You must pass this config to the MediaCore.
interface IMedia {
Constraints: {
audio?: boolean,
video?: boolean
},
mediaRecorderOptions?: {
mimeType: string
audioBitsPerSecond?: number,
videoBitsPerSecond?: number
bitsPerSecond?: number,
}
}
Feel free to submit a PR if you found a bug (I might've missed many! 😀) or if you want to enhance it further.
Thanks!. Happy Recording!
FAQs
A Typescript code, based on MediaRecorder() API to get MediaRecorder
The npm package media-core receives a total of 11 weekly downloads. As such, media-core popularity was classified as not popular.
We found that media-core 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.