viro icon indicating copy to clipboard operation
viro copied to clipboard

ViroSpatialSound and ViroSoundField are not working on iOS or Android

Open robertjcolley opened this issue 2 years ago • 7 comments

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

  • [ ] ViroSpatialSound crashes with invariant violation: Unrecognized selector sent to instance
  • [ ] ViroSoundField crashes with invariant violation: Unrecognized selector sent to instance

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 [email protected].

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

robertjcolley avatar Dec 23 '21 22:12 robertjcolley

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

doranteseduardo avatar Dec 29 '21 05:12 doranteseduardo

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 avatar Dec 29 '21 13:12 robertjcolley

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 avatar Jan 21 '22 12:01 robertjcolley

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.

robertjcolley avatar Jan 21 '22 12:01 robertjcolley

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

mondriy avatar Jan 25 '22 14:01 mondriy

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

robertjcolley avatar Jan 25 '22 18:01 robertjcolley

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.

mondriy avatar Feb 20 '22 12:02 mondriy