edbentley / replay

A cross-platform JS game engine inspired by React
https://replay.js.org
MIT License
298 stars 11 forks source link

Additional audio API methods #83

Closed ejb closed 3 years ago

ejb commented 3 years ago

This (finally!) implements #36

ejb commented 3 years ago

Thanks for your feedback, I think I've fixed the issues we discussed.

edbentley commented 3 years ago

Actually I believe this is an existing bug with playState since getPosition() also has this issue. Just adding these new APIs has made it more visible!

ejb commented 3 years ago

Ok, think I've resolved those issues. Seemed to be caused by the value of playState being cached in those instances. Reading from data.playState instead gives correct values.