mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-25 07:22:33 -05:00
add check for audioengine
This commit is contained in:
parent
18c88c8ee0
commit
bd8fdad1d4
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ RenderedTarget.prototype.initDrawable = function () {
|
||||||
* Audio player
|
* Audio player
|
||||||
*/
|
*/
|
||||||
this.audioPlayer = null;
|
this.audioPlayer = null;
|
||||||
if (this.runtime) {
|
if (this.runtime && this.runtime.audioEngine) {
|
||||||
if (this.isOriginal) {
|
if (this.isOriginal) {
|
||||||
this.sprite.audioPlayer = this.runtime.audioEngine.createPlayer();
|
this.sprite.audioPlayer = this.runtime.audioEngine.createPlayer();
|
||||||
this.sprite.audioPlayer.loadSounds(this.sprite.sounds);
|
this.sprite.audioPlayer.loadSounds(this.sprite.sounds);
|
||||||
|
|
Loading…
Reference in a new issue