Comments (2)
给每个音频都 new 一个 BenzAMRRecorder
对象,每个对象是独立的,分别控制播放和停止等。支持多个对象同时混音播放。
以下是伪代码(不能运行的,别直接使用):
var playButtons = [/* 假设这里有n个播放按钮 */];
var amrUrlList = ['http://url1.amr', 'http://url2.amr', ...]; // 有n个amr文件的url
var amrList = [];
for (var i = 0; i < amrUrlList.length; i++) {
amrList[i] = new BenzAMRRecorder();
amrList[i].initWithUrl(amrUrlList[i]);
playButtons[i].onclick = function() {
// 实际上这里不能直接引用循环变量 [i] ,我就示意一下
amrList[i].play();
}
}
from benz-amr-recorder.
谢谢 我研究下
from benz-amr-recorder.
Related Issues (20)
- 可以提供一个销毁组件实例的方法么? HOT 1
- The AudioContext was not allowed to start HOT 1
- 小程序无法使用 HOT 1
- 如果播amr 正播放呢,我把这个页面销毁了,音频还在播放bug HOT 5
- iso静音键打开就不能播放amr了,调大音量无效 HOT 3
- 经常性不能录音 HOT 1
- e Error: Failed to decode. at BenzAMRRecorder.js:30513 HOT 1
- 点击当前音频的播放按钮可以控制播放和暂停; HOT 1
- Unable to decode audio data HOT 4
- No Volume support
- Play two at the same time
- webpack5、babel 7 打包之后调用报错
- 60秒的amr录音文件播放只有37秒 HOT 3
- 同一页面同时完成多个实例url 初始化 HOT 2
- DOMException: Failed to execute 'decodeAudioData' on 'BaseAudioContext': Unable to decode audio data HOT 1
- ios 息屏后在点击播放没有声音 HOT 1
- 可以考虑支持流式录制播放吗 HOT 1
- 浏览器里 测试demo.html报错,播放.amr文件 HOT 2
- 手机通话录音的amr文件好像就无法播放? HOT 1
- 移动端的性能问题 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from benz-amr-recorder.