I have multiple sounds in my app, some of them should use Playback mode, and some of them Ambient.
:beetle: What have you tried?
creating a new Sound everytime and using setCategory on this sound.
:beetle: Please post your code:
const buildSound = (key, soundAsset) => new Promise((resolve) => {
const sound = new Sound(soundAsset, (error) => {
if (error) {
console.log('failed to load the sound', error);
return;
}
sound.setCategory(category);
soundMap = { ...soundMap, [key]: sound };
resolve(soundMap);
});
});
:bulb: Possible solution
I have a solution which i don't like, reset the category everytime when i finish working with a sound.
couln't find better solution. (seCategory is static )
Is your issue with...
:beetle: Description
I have multiple sounds in my app, some of them should use Playback mode, and some of them Ambient.
:beetle: What have you tried?
creating a new Sound everytime and using setCategory on this sound.
:beetle: Please post your code:
:bulb: Possible solution
I have a solution which i don't like, reset the category everytime when i finish working with a sound. couln't find better solution. (seCategory is static ) Is your issue with...
Are you using...
react-native run-android
)Which versions are you using?