Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with hubsToOMIAudioEmitter() and new Hubs updates #5

Open
antpb opened this issue Feb 23, 2022 · 1 comment
Open

Issue with hubsToOMIAudioEmitter() and new Hubs updates #5

antpb opened this issue Feb 23, 2022 · 1 comment

Comments

@antpb
Copy link
Contributor

antpb commented Feb 23, 2022

It seems Spoke was updated recently resulting in a new structure for audio params when you export a glb. Heres an example blob from an audio object I converted with my latest Spoke.

{"MOZ_hubs_components":{ "audio-params":{ "gain":0.55,"distanceModel":"linear","rolloffFactor":1,"refDistance":1,"maxDistance":3}, "audio": {"src":"https://sxp-meeting-space-assets.sxp-meeting-space.xpxr.rest/files/1a26d956-e94f-499a-9c71-fd02464cf278.mp3", "controls":true, "autoPlay":true, "loop":true }

Notice it no longer has audioType property. Fallback in our logic is:

audioEmitter._type = audioParams.audioType === "pannernode" ? "positional" : "global";

Which makes every positional turn into a global. I could get around this by checking for distanceModel as well as the type, but I suspect that this is an issue with Spoke and maybe even Hubs Cloud branch only. Making the issue here to track it.

@antpb
Copy link
Contributor Author

antpb commented Feb 23, 2022

It seems to be happening on hubs.mozilla.com/spoke as well.

I think a patch of checking for distanceModel isn't the worst..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant