npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

js-stream-recorder

v0.1.5

Published

js stream recorder

Downloads

2

Readme

recorder

js ~~audio~~ stream recorder is a fork of the original repo. This is not getting maintained. Just for my own purpose.

Needed the option to set my own stream instead using the navigator.

主要用于 Web 端录制短音频。

  • 支持录音,暂停,恢复,和录音播放。
  • 支持音频数据的压缩,支持单双通道录音。
  • 支持录音时长、录音大小的显示。
  • ~~支持边录边转(播放)~~(0.x 支持)。
  • 支持导出录音文件,格式为 pcm 或 wav。
  • 支持录音波形显示,可自己定制。
  • 录音数据支持第三方平台的语音识别。
  • 支持 MP3(借助lamejs)。

使用

在线演示地址

Recorder

在线文档

文档

demo 使用

npm ci (推荐) 或 npm install
npm run dev

调试移动端

npm run https

编译

npm run build

使用方法

引入方式

  • npm 方式:

安装:

npm i js-audio-recorder

调用:

import Recorder from "js-audio-recorder";

let recorder = new Recorder({ stream: your_media_stream_object });
  • script 标签方式
<script type="text/javascript" src="./dist/recorder.js"></script>;

let recorder = new Recorder({ stream: your_media_stream_object });

API

详细请查看文档

任务列表

  • [x] 拆分 recorder 到各个功能模块。
  • [x] 增加 test 代码。
  • [x] promise,支持 async, await。
  • [ ] 功能完善。
  • [x] 兼容性测试。
  • [x] 支持边录音边转换(播放)。

注意

  1. 使用 127.0.0.1 或 localhost 尝试,因为 getUserMedia 在高版本的 chrome 下需要使用 https。

兼容性

以下为测试结果,低于以下版本并不表示不支持,可能是未测试到,增加或标注请查看:issues6

window pc 端

| Chrome | Firefox | Edge | Safari | Opera | IE | | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | 38+ | 30+ | 42+ | 11+ | 21+ | 不支持 |

移动端

安卓

| Chrome | Firefox | Safari | Opera | UC | QQ | 猎豹 | 搜狗 | 华为 | 小米 | | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | --------- | --------- | --------- | | 42+ | 40+ | ? | 不支持 | 不支持 | 9.2+ | 不支持 | 不支持 | 不支持 | 不支持 |

IOS

| Chrome | Firefox | Safari | Opera | UC | QQ | 猎豹 | 搜狗 | 华为 | 小米 | | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | --------- | --------- | --------- | | ? | ? | 11+ | ? | ? | ? | ? | ? | ? | ? |

需要打开浏览器录音权限,在设置-权限中可以配置。

其他资源