repo: janusweb action: commit revision: path_from: revision_from: 81cf1e1c1564ac223b04cd112a38245f46c3e05e: path_to: revision_to:
commit 81cf1e1c1564ac223b04cd112a38245f46c3e05e Author: James BaicoianuDate: Sun Apr 24 00:53:45 2022 -0700 Added explicit override to force positional audio diff --git a/scripts/sound.js b/scripts/sound.js
--- a/scripts/sound.js
+++ b/scripts/sound.js
@@ -7,6 +7,7 @@ elation.require(['janusweb.janusbase'], function() {
this.defineProperties({
sound_id: { type: 'string', set: this.updateSound },
singleshot: { type: 'boolean', default: false },
+ positional: { type: 'boolean', default: null },
loop: { type: 'boolean', default: false },
auto_play: { type: 'boolean', default: false },
play_once: { type: 'boolean', default: false },
@@ -54,7 +55,7 @@ elation.require(['janusweb.janusbase'], function() {
if (!audionodes) {
audionodes = await this.room.getAudioNodes();
}
- if (!this.hasposition) {
+ if (!this.hasposition && this.positional !== true) {
this.audio = new THREE.Audio(audionodes.listener);
} else {
this.audio = new THREE.PositionalAudio(audionodes.listener);
@@ -223,6 +224,7 @@ elation.require(['janusweb.janusbase'], function() {
playing: [ 'property', 'playing', 'sound.isPlaying'],
pitch: [ 'property', 'pitch'],
auto_play: [ 'property', 'auto_play'],
+ positional: [ 'property', 'positional'],
play: [ 'function', 'play'],
pause: [ 'function', 'pause'],
stop: [ 'function', 'stop'],
-----END OF PAGE-----