var Platform = require('pex-sys').Platform;
module.exports = Platform.isPlask ? require('./PlaskAudio') : require('./HTMLAudio');
Simple audio playback
var audio = new Audio("assets/test.mp3");
audio.play();
audio.volume = 0.5;
var Platform = require('pex-sys').Platform;
module.exports = Platform.isPlask ? require('./PlaskAudio') : require('./HTMLAudio');
Please refer to one of the platform specific impelementations (they have the same API):
HTMLAudio for the browser
PlaskAudio for the plask