naomiaro / waveform-playlist

Multitrack Web Audio editor and player with canvas waveform preview. Set cues, fades and shift multiple tracks in time. Record audio tracks or provide audio annotations. Export your mix to AudioBuffer or WAV! Add effects from Tone.js. Project inspired by Audacity.
https://naomiaro.github.io/waveform-playlist/
MIT License
1.47k stars 287 forks source link

Pause event does not include pause state #255

Open amit opened 10 months ago

amit commented 10 months ago

Question: How do I intercept mute/unmute and take different actions based on mute state?

I have the following code:

    this.playlist.ee.on("mute", function(track) {
      console.log("Track: " + track.name + " muteFlag is " + track.data);
    });

But I am confused what attribute on track object can I use to find the mute state (whether the track will be muted or unmuted)? Web inspector did not reveal anything which can tell me...

Thanks!