Giter Site home page Giter Site logo

暂停录音后,将数据深拷贝了,在拷贝的哪部分上播放后,原来的不能继续录音。为什么这种情况。 about recorder HOT 3 CLOSED

2fps avatar 2fps commented on May 16, 2024
暂停录音后,将数据深拷贝了,在拷贝的哪部分上播放后,原来的不能继续录音。为什么这种情况。

from recorder.

Comments (3)

sleepyddl avatar sleepyddl commented on May 16, 2024

可能我没有描述清楚问题。

场景是这样的,点击顺序 开始 --> 克隆 --> 继续

问题是,对克隆后的a 进行继续录音 无效

HTML

<button class="start">开始</button>
<button class="clone">克隆</button>
<button class="resume">继续</button>

JS

let recorder = new Recorder();
let a = null;

document.querySelector(".start").addEventListener("click", () => {
  recorder.start();
  setTimeout(() => {
    recorder.pause();
  }, 2000);
});

document.querySelector(".clone").addEventListener("click", () => {
  a = _.cloneDeep(recorder);
  console.log(a);
});

document.querySelector(".resume").addEventListener("click", () => {
  a.resume();
  setInterval(() => {
    console.log(a);
  }, 1000);
});

from recorder.

2fps avatar 2fps commented on May 16, 2024

二进制数据,不能这么拷贝的呀,转成dateview去处理

from recorder.

sleepyddl avatar sleepyddl commented on May 16, 2024

哈哈 我小白 过段时间试试

from 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.