Tonejs / Tone.js

A Web Audio framework for making interactive music in the browser.
https://tonejs.github.io
MIT License
13.45k stars 977 forks source link

Player is playing function #1177

Closed guyluz11 closed 1 year ago

guyluz11 commented 1 year ago

The feature you'd like isPlaying function for the player which returns if the player is still in the process of playing the sound

Any alternatives you've considered I thought that seek or loopEnd will help but it doesn't seem so. I Found _onSourceEnd but it is private

It sounds like something that I just missed and exists if not lets open _onSourceEnd and I will add an external bool var

marcelblum commented 1 year ago

check out the player.state property https://tonejs.github.io/docs/14.7.77/Player#state

guyluz11 commented 1 year ago

I think this is the one Thanks :)