ReactVision / viro

ViroReact: The AR and VR library for React Native 📳💙💛🤍💚
MIT License
1.41k stars 164 forks source link

ViroSpatialSound and ViroSoundField are not working on iOS or Android #74

Open robertjcolley opened 2 years ago

robertjcolley commented 2 years ago

Requirements:

Please go through this checklist before opening a new issue

Environment iOS

Please provide the following information about your environment:

  1. Macbook Pro
  2. Device OS & Version: iPhone11 iOS (15.3)
  3. ViroReact: 2.22.0
  4. React Native: 0.65.1

Environment Android

Please provide the following information about your environment:

  1. Macbook Pro
  2. Device OS & Version: Google Pixel XL (Android 10)
  3. ViroReact: 2.22.0
  4. React Native: 0.65.1

Description

Reproducible Demo

⚠️ NOTE: I've installed viro react from a local download of the viro react to make changes to the viro react source code. All of these issues have been replicated with viro@2.22.0.

ViroSpatialSound

https://github.com/NS-BOBBY-C/starter-kit/blob/4d93e7dd3ae05d089573f07f20964e2258a1933d/screens/viro_tests/ViroSpatialSound.tsx#L1-L48

ViroSoundField

https://github.com/NS-BOBBY-C/starter-kit/blob/4d93e7dd3ae05d089573f07f20964e2258a1933d/screens/viro_tests/ViroSoundField.tsx#L1-L48

doranteseduardo commented 2 years ago

Are you doing your tests with the latest version from NPM or GitHub?

robertjcolley commented 2 years ago

Both. I was originally using the master branch from GitHub, but then switched back to NPM to confirm it wasn't an issue with my local viroreact repo

robertjcolley commented 2 years ago

Just confirmed @doranteseduardo that this was still an issue. My process:

  1. Remove node_modules from my fork of starter-kit
  2. Remove ios/podfile.lock, yarn.lock, package-lock.json
  3. Update package.json to use "^2.22.0" instead of "../viro"
  4. yarn install
  5. Create demo for starter-kit https://github.com/NS-BOBBY-C/starter-kit/blob/101d6bf7c9995c16fb3c6ba7bc1b3c9d5f05d447/screens/github_issues/Issue74.tsx
  6. See that it isn't working (screen recording)

https://user-images.githubusercontent.com/29097404/150527588-c81a6f70-18dd-489b-969e-28fed2f2c07e.MP4

robertjcolley commented 2 years ago

Just confirmed this as an issue on an android phone as well. Google Pixel XL, android 10. Android doesn't crash or have a red error LogBox, but the sound does not play.

mondriy commented 2 years ago

The same problem.. Android 11. Are there any solutions?

robertjcolley commented 2 years ago

@mondriy you can use ViroSound, which works as expected.

mondriy commented 2 years ago

I tried ViroSound, but in my project I need in this feature because volume of sound depends of space. Do you know how to solve this problem? May be you planed to fix this in future upd? Thanks.