Git Product home page Git Product logo

Comments (2)

BenzLeung avatar BenzLeung commented on September 28, 2024

给每个音频都 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.

SupperMan1992820 avatar SupperMan1992820 commented on September 28, 2024

谢谢 我研究下

from benz-amr-recorder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.