简体   繁体   English

为什么我在玩 wavesurfer.js 时有 2 个波形?

[英]Why do I have 2 waveforms with wavesurfer.js when playing?

I have:我有:

this.wavesurfer = WaveSurfer.create({
        container: "#wavesurfer-player",
        height: 50,
        audioContext: _.get(this.$store, "state.audioContext.context"),
        waveColor: "blue",
        progressColor: "red"
      });
      this.wavesurfer.on("loading", progress => {
        this.loadingProgress = progress;
      });
      this.wavesurfer.load(this.url);

      this.wavesurfer.on("ready", () => {
        this.loadingProgress = 100;
        this.wavesurfer.un("ready");
      });

This works out well:这很好用: 在此处输入图像描述

But when I play, another waveform is shown:但是当我播放时,会显示另一个波形: 在此处输入图像描述

What am I doing wrong?我究竟做错了什么?

Setting them both to the same color seems to have solved this:将它们都设置为相同的颜色似乎已经解决了这个问题:

        waveColor: "blue",
        progressColor: "red"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM