All Projects → wsdo → Recording

wsdo / Recording

html5 录音

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Recording

streamdvr
DVR for streaming entertainment
Stars: ✭ 51 (+15.91%)
Mutual labels:  recording
pedalboard
Online guitar pedalboard
Stars: ✭ 48 (+9.09%)
Mutual labels:  recording
React Native Image Crop Picker
iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
Stars: ✭ 5,261 (+11856.82%)
Mutual labels:  recording
SwiftUIViewRecorder
Efficiently record any SwiftUI View as image or video
Stars: ✭ 20 (-54.55%)
Mutual labels:  recording
termbacktime
Terminal recording and playback.
Stars: ✭ 33 (-25%)
Mutual labels:  recording
Animatedrecordingview
Android animated recording view
Stars: ✭ 345 (+684.09%)
Mutual labels:  recording
ZFScreenRecorder
录屏,支持暂停、取消
Stars: ✭ 38 (-13.64%)
Mutual labels:  recording
Chipkizi
a recording app for up and coming artists
Stars: ✭ 26 (-40.91%)
Mutual labels:  recording
cm
Configuration management for all VOC systems
Stars: ✭ 17 (-61.36%)
Mutual labels:  recording
Self Driving Desktop
Desktop Automation Framework. Drive your mouse and keyboard with an easy to use language.
Stars: ✭ 536 (+1118.18%)
Mutual labels:  recording
MIDITapeRecorder
AUv3 MIDI Tape Recorder
Stars: ✭ 91 (+106.82%)
Mutual labels:  recording
scr
🎤 A Super CRappy SCReenshot & SCreen Recording SCRipt for Sound Cloud Rappers + audio recorder, yes (sponsored by https://git.io/kiwmi)
Stars: ✭ 16 (-63.64%)
Mutual labels:  recording
Recordmp3js
Record MP3 files directly from the browser using JS and HTML
Stars: ✭ 413 (+838.64%)
Mutual labels:  recording
amanuensis
The Amanuensis is an automated songwriting and recording system aimed at ridding the process of anything left-brained, so one need never leave a creative, spontaneous and improvisational state of mind, from the inception of the song until its final master. See the README for instructions and feel free to message me at soundcloud.com/to_the_sun.
Stars: ✭ 30 (-31.82%)
Mutual labels:  recording
Androbd
Android OBD diagnostics with any ELM327 adapter
Stars: ✭ 573 (+1202.27%)
Mutual labels:  recording
SWET
Selenium WebDriver Page Test / workflow recorder (successor to SWD recorder)
Stars: ✭ 34 (-22.73%)
Mutual labels:  recording
reading books record repository
📚 책을 읽고 정리합니다. 📖 Summary of Books 👉 우리 같이 책을 읽어볼까요?
Stars: ✭ 25 (-43.18%)
Mutual labels:  recording
Wiremockui
Wiremock UI - Tool for creating mock servers, proxies servers and proxies servers with the option to save the data traffic from an existing API or Site.
Stars: ✭ 38 (-13.64%)
Mutual labels:  recording
Gors
go实现的终端录屏程序
Stars: ✭ 19 (-56.82%)
Mutual labels:  recording
Betamax
A VCR imitation designed only for python-requests.
Stars: ✭ 468 (+963.64%)
Mutual labels:  recording

h5 录音组件

兼容问题

h5录音主要使用AudioContext 和 getUserMedia 兼容性还是很差的,尤其是在移动端。

AudioContext

getUserMedia

ios端支持情况

Chrome 浏览器,QQ浏览器, (safari 除外)几乎都不支持

同样问题: 不支持 navigator.getUserMedia 不支持 navigator.mediaDevices.getUserMedia 不支持 navigator.mediaDevices

影响到以下浏览器 (除了safari 外)

ios Chrome 不支持 getUserMedia
ios 手机QQ 不支持 getUserMedia ios QQ浏览器 不支持 getUserMedia ios uc浏览器 不支持 getUserMedia

安卓端支持情况

Chrome 支持友好

汇总支持情况表格

2018年04月11日 测试情况

请忽略,看下面表格(预留格式,可以使用markdown格式化表格)

浏览器    版本    mac  安卓  ios  
Chrome   最新版  兼容  兼容  不兼容
QQ浏览器  最新版  兼容  不兼容  不兼容
手机QQ    最新版  不需要  支持  不支持
uc浏览器  最新版  不需要  支持  不支持

格式化后的表格

浏览器 | 版本 | mac | 安卓 | ios | ----|----|-----|----|-----|- Chrome | 最新版 | 兼容 | 兼容 | 不兼容 QQ浏览器 | 最新版 | 兼容 | 不兼容 | 不兼容 手机QQ | 最新版 | 不需要 | 支持 | 不支持 uc浏览器 | 最新版 | 不需要 | 支持 | 不支持

兼容方案

> 开发的时候分别照顾到以上的场景,

  • 如果在html5嵌入到app端,调用app的api即可
  • 如果在微信的场景,直接调用微信里面的录音api
  • 如果是普通的浏览器,尽量把兼容的方式写好

测试记录

苹果手机需要内核大于 webkit > 605 Safari 才支持

ios目前只有Safari 支持

支持格式

目前仅支持mp3格式 后期会支持wav格式

测试demo

先把demo把需要应用的场景测试一遍,再进行业务开发

测试地址

https://shudong.wang/recorder/demo

选项

    import Recorder from 'recorder'

    配置:
    const config = {
      sampleRate: 采样率:默认:44100,
      bitRate: 比特率默认:128
    }

    new Recorder(this.microphone, config)

开始录制

  this.recorder.record()

停止录制

this.recorder.stop()

清除

this.recorder.clear()

停止录制完回调mp3

recorder.exportAudio((blob) => {
  var url = URL.createObjectURL(blob);
  //在此处上传到静态服务器
});

使用方式

普通demo

  navigator.mediaDevices.getUserMedia({ audio: true })
  .then(startUserMedia)
  .catch(errorHandler)

  function startUserMedia(stream) {
    var input = audio_context.createMediaStreamSource(stream);

    var config = {
      sampleRate: 16000,
      bitRate: 16
    };

    recorder = new Recorder(input,config);
  }

  function startRecording() {
    recorder && recorder.record();
  }

  function stopRecording() {
    recorder && recorder.stop();
    recorder && recorder.exportAudio(function(blob) {
      var url = URL.createObjectURL(blob);
    });
    recorder && recorder.clear();
  }

in react demo

import recorder from 'h5-recording'

componentWillMount() {
    navigator.mediaDevices.getUserMedia({ audio: true })
      .then(this.sucessHandler)
      .catch(this.errorHandler)
  }
  componentWillUnmount() {
    this.audioContext.close()
    this.recorder.clear()
  }

  getAudioContext = () => (
    window.AudioContext ||
    window.webkitAudioContext
  )

  start = () => {
    this.recorder.record()
  }

  stop = () => {
    this.recorder.stop()
    this.recorder.exportAudio(function (blob) {
      var url = URL.createObjectURL(blob);
      //在此处上传
    });
    this.recorder.clear()
  }

  sucessHandler = (stream) => {
    this.microphone = this.audioContext.createMediaStreamSource(stream)
    const config = {
      sampleRate: DEFAULT_SAMPLE_RATE,
      bitRate: DEFAULT_BIT_RATE
    }
    this.recorder = new StarkRecorderJs(this.microphone, config)
  }

  errorHandler = (error) => {
    const { onError } = this.props
    onError(error)
  }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].