mirror of
https://github.com/overte-org/overte.git
synced 2025-04-29 20:42:36 +02:00
If sound is already downloaded, it's fetched from cache
This commit is contained in:
parent
964763b88c
commit
1bfe14c70e
2 changed files with 3 additions and 3 deletions
|
@ -40,6 +40,7 @@ print("EBL STARTING AC SCRIPT");
|
|||
|
||||
function messageReceived(channel, message, sender) {
|
||||
|
||||
print("EBL RECEIVED A MESSAGE FROM ENTITY: " + message);
|
||||
var entityID = JSON.parse(message).id;
|
||||
if (soundEntityMap[entityID]) {
|
||||
// We already have this entity in our sound map, so don't re-add
|
||||
|
@ -47,7 +48,6 @@ function messageReceived(channel, message, sender) {
|
|||
}
|
||||
|
||||
EntityViewer.queryOctree();
|
||||
print("EBL RECEIVED A MESSAGE FROM ENTITY: " + message);
|
||||
var soundData = getEntityCustomData(SOUND_DATA_KEY, entityID);
|
||||
print("SOUND DATA " + JSON.stringify(soundData))
|
||||
if (soundData && soundData.url) {
|
||||
|
|
|
@ -22,8 +22,8 @@ var SCRIPT_URL = Script.resolvePath("soundEntityScript.js?v1" + Math.random());
|
|||
var userData = {
|
||||
soundKey: {
|
||||
url: "https://s3-us-west-1.amazonaws.com/hifi-content/eric/Sounds/dove.wav",
|
||||
volume: 1.0,
|
||||
loop: false
|
||||
volume: 0.2,
|
||||
loop: true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue