edbentley / replay

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

Update audio play and include overwrite field #67

Closed edbentley closed 3 years ago

edbentley commented 3 years ago

Breaking change. This refactors audio("filename").play to allow more fields to passed in.

Also adds a new field overwrite to ensure the same sound file can't be played twice (e.g. background music). Previously trying to pause and play the sound in one frame would not work.