mirror of
https://github.com/overte-org/overte.git
synced 2025-04-30 02:02:45 +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) {
|
function messageReceived(channel, message, sender) {
|
||||||
|
|
||||||
|
print("EBL RECEIVED A MESSAGE FROM ENTITY: " + message);
|
||||||
var entityID = JSON.parse(message).id;
|
var entityID = JSON.parse(message).id;
|
||||||
if (soundEntityMap[entityID]) {
|
if (soundEntityMap[entityID]) {
|
||||||
// We already have this entity in our sound map, so don't re-add
|
// 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();
|
EntityViewer.queryOctree();
|
||||||
print("EBL RECEIVED A MESSAGE FROM ENTITY: " + message);
|
|
||||||
var soundData = getEntityCustomData(SOUND_DATA_KEY, entityID);
|
var soundData = getEntityCustomData(SOUND_DATA_KEY, entityID);
|
||||||
print("SOUND DATA " + JSON.stringify(soundData))
|
print("SOUND DATA " + JSON.stringify(soundData))
|
||||||
if (soundData && soundData.url) {
|
if (soundData && soundData.url) {
|
||||||
|
|
|
@ -22,8 +22,8 @@ var SCRIPT_URL = Script.resolvePath("soundEntityScript.js?v1" + Math.random());
|
||||||
var userData = {
|
var userData = {
|
||||||
soundKey: {
|
soundKey: {
|
||||||
url: "https://s3-us-west-1.amazonaws.com/hifi-content/eric/Sounds/dove.wav",
|
url: "https://s3-us-west-1.amazonaws.com/hifi-content/eric/Sounds/dove.wav",
|
||||||
volume: 1.0,
|
volume: 0.2,
|
||||||
loop: false
|
loop: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue