Catalog npm
Back to packageRELEASE DETAILS

1.0.1

npm

24-audio

Record your microphone audio input and get an audio/mp3 ouput buffer/blob.

Published15 Jan 2018
Direct dependencies11
Transitive dependenciesNot calculated

README

Current package documentation

24-audio

Record your microphone audio input and get an audio/mp3 file in the end. This project is supplementary to the mic-recorder-to-mp3 . (Fix compatibility issues with safri browsers.)

Install

npm

npm install 24-audio

How to use

const MicRecorder = require('24-audio');

// New instance
const recorder = new MicRecorder({
  bitRate: 128
});

// Start recording. Browser will request permission to use your microphone.
recorder.start().then(() => {
  // something else
}).catch((e) => {
  console.error(e);
});

// Once you are done singing your best song, stop and get the mp3.
recorder
.stop()
.getMp3().then(([buffer, blob]) => {
  // do what ever you want with buffer and blob
  // Example: Create a mp3 file and play
  const file = new File(buffer, 'me-at-thevoice.mp3', {
    type: blob.type,
    lastModified: Date.now()
  });

  const player = new Audio(URL.createObjectURL(file));
  player.play();

}).catch((e) => {
  alert('We could not retrieve your message');
  console.log(e);
});

Lamejs Notice

This library uses lamejs as a direct dependency. We build our releases with lamejs built-in, so you don't need to add another dependency.

Thanks to @zhuker for writing the lamejs library.

This project is supplementary to the mic-recorder-to-mp3

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 11

Native requirements
11 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
lamejs
Environment
{
  "local_name": "lamejs",
  "alias": false,
  "peer_metadata": null
}
^1.2.0runtime
babel-core
Environment
{
  "local_name": "babel-core",
  "alias": false,
  "peer_metadata": null
}
^6.25.0development
babel-plugin-external-helpers
Environment
{
  "local_name": "babel-plugin-external-helpers",
  "alias": false,
  "peer_metadata": null
}
^6.22.0development
babel-preset-env
Environment
{
  "local_name": "babel-preset-env",
  "alias": false,
  "peer_metadata": null
}
^1.5.2development
rollup
Environment
{
  "local_name": "rollup",
  "alias": false,
  "peer_metadata": null
}
^0.43.0development
rollup-plugin-babel
Environment
{
  "local_name": "rollup-plugin-babel",
  "alias": false,
  "peer_metadata": null
}
^2.7.1development
rollup-plugin-commonjs
Environment
{
  "local_name": "rollup-plugin-commonjs",
  "alias": false,
  "peer_metadata": null
}
^8.0.2development
rollup-plugin-node-resolve
Environment
{
  "local_name": "rollup-plugin-node-resolve",
  "alias": false,
  "peer_metadata": null
}
^3.0.0development
rollup-plugin-uglify
Environment
{
  "local_name": "rollup-plugin-uglify",
  "alias": false,
  "peer_metadata": null
}
^2.0.1development
rollup-watch
Environment
{
  "local_name": "rollup-watch",
  "alias": false,
  "peer_metadata": null
}
^4.0.0development
webrtc-adapter
Environment
{
  "local_name": "webrtc-adapter",
  "alias": false,
  "peer_metadata": null
}
^4.1.1peer

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-hLyqBWaKUkE4sJvR3oNqC/l+6Vtnot1hejDIkNKebBbhowDkHK1yFaT5n7M7SJ5kLnCwpnj9DcC4n9IK++HRxQ==",
  "shasum": "18b520fd451c4935ee14b8ed34876d4de0a635a6",
  "tarball": "https://registry.npmjs.org/24-audio/-/24-audio-1.0.1.tgz",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEQCIE4V/PhP7H42QOnfg9fbewnWug1OiU/zYStXP0+P99kZAiBLaGt9gqr9Gt3SEKteVhWZ42CAG8iYmwpZhb2zCtB7tw=="
    }
  ]
}

Repository

PENDING
th720309/24-audio

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:02 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:baf54d2ec51ee03a3a455a16bfe0613d708d7e3622edb2c0c3bb5aecfc519af5

Other collected versions

1.0.316 Jan1.0.216 Jan1.0.015 JanView all collected versions →