Merge pull request #8816 from davidkelly/dk/1811

CellScience play button doesn't play anything
This commit is contained in:
Brad Hefta-Gaub 2016-10-17 21:20:57 -07:00 committed by GitHub
commit f9054bef9b
2 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@
// //
(function() { (function() {
var baseURL = "https://hifi-production.s3.amazonaws.com/hifi-production/DomainContent/CellScience/"; var baseURL = "https://hifi-production.s3.amazonaws.com/DomainContent/CellScience/";
var self = this; var self = this;
this.buttonImageURL = baseURL + "GUI/play_audio.svg?2"; this.buttonImageURL = baseURL + "GUI/play_audio.svg?2";
@ -116,4 +116,4 @@
Controller.mousePressEvent.connect(this.onClick); Controller.mousePressEvent.connect(this.onClick);
Script.update.connect(this.update); Script.update.connect(this.update);
}); });

View file

@ -47,8 +47,7 @@
stereo: true, stereo: true,
loop: false, loop: false,
localOnly: true, localOnly: true,
volume: 0.035, volume: 0.45,
position: properties.position
}; };
self.sound = SoundCache.getSound(self.soundURL); self.sound = SoundCache.getSound(self.soundURL);
self.buttonImageURL = baseURL + "GUI/GUI_audio.png?" + version; self.buttonImageURL = baseURL + "GUI/GUI_audio.png?" + version;
@ -142,6 +141,7 @@
Overlays.editOverlay(self.button, { Overlays.editOverlay(self.button, {
visible: false visible: false
}); });
self.soundOptions.position = MyAvatar.position;
this.soundPlaying = Audio.playSound(self.sound, self.soundOptions); this.soundPlaying = Audio.playSound(self.sound, self.soundOptions);
} else { } else {
// print("not downloaded"); // print("not downloaded");
@ -162,4 +162,4 @@
Controller.mousePressEvent.connect(this.onClick); Controller.mousePressEvent.connect(this.onClick);
}); });