CreateJS / SoundJS

A Javascript library for working with Audio. It provides a consistent API for loading and playing audio on different browsers and devices. Currently supports WebAudio, HTML5 Audio, Cordova / PhoneGap, and a Flash fallback.
http://createjs.com/
MIT License
4.42k stars 838 forks source link

Reordering Sound.js export and its `_initialize()` call. #317

Open probityrules opened 4 years ago

probityrules commented 4 years ago

The current version doesn't work in webpack, since it tries to create a reference to Sound, but the initialization for Sound includes creating instances of other classes (such as AbstractAudioWrapper) that require a reference to Sound which has yet to be created. By re-ordering the export so that it is exported before it is initialized, a reference for Sound exists for those classes requiring it in Sound's _initialize() invocation.