Open oodavid opened 9 years ago
Feature Request: play to have additional "volume" option.
This logically redact this code:
audio.setVolume('sfx', 0.5);
audio.play('sfx', { time: 1000, duration: 500 });
to
audio.play('sfx', { time: 1000, duration: 500, volume: 0.5 });
Numerous issues with AudioManager spanning the Simulator, Native and Documentation.
I've knocked up a demo app so you can test these issues against it. Feel free to pack it up and use it in the documentation.
The MusicTest Repo (click me!)
Simulator
Nota Bene - @collingreen said that volume doesn't work on android and that passing "time" doesn't work on iOS...
iOS
Android
Addendum
On the subject of units, I think milliseconds would be a sensible choice over seconds. I know setTime requires seconds from reading through the sources, however the documentation doesn't specify units and the methods appear to be inconsistent. Logic: animate, tick, setInterval and setTimeout all use milliseconds. (let's just ignore the weird javascript's date timestamp thing)