This page is work-in-progress. You can reach me on twitter or mail to rezoner1337@gmail.com

Playground.js plugin

Sound on demand comes also as a plugin for Playground.js

  1. Plugin replaces loadSound and loadSounds methods to integrate with playground's loader flow.

  2. Plugin instantiates SoundOnDemand as this.audio

  3. You still need to define desired channels

var app = new PLAYGROUND.Application({

  create: function() {

    this.sound = this.audio.channel("sound");
    this.music = this.audio.channel("music");   

  }

})
  1. Plugin respects this.paths.base and this.paths.sounds
var app = new PLAYGROUND.Application({

  paths: {
    base: "assets/",
    sounds: "audio/"
  }

})

Ask question:

Fork me on GitHub