zmxv / react-native-sound

React Native module for playing sound clips
MIT License
2.79k stars 748 forks source link

How can I play only one voice #587

Open wkl460 opened 5 years ago

wkl460 commented 5 years ago

I have many sound. When I click on them, they will play together. I want to stop the last one when I click on them.

paulmelnikow commented 5 years ago

Hi! Can you be more specific please?

Some good advice to improve your chances of getting an answer: https://stackoverflow.com/help/how-to-ask

wkl460 commented 5 years ago

嗨!你能说得更具体点吗?

一些好的建议可以提高你得到答案的机会:https://stackoverflow.com/help/how-to-ask

I have many sound. When I click on them, they will play together. I want to stop the last one when I click on them.

parnekov commented 5 years ago

I have many sounds. When the first sound start to play and the second sound start to play they are playing together. How can I stop the first one when the second sound start to play?

wkl460 commented 5 years ago

把Sound封装一个函数 把要播放的声音传入, 让他们用一个Sound 方法

Encapsulate Sound as a function to pass in the Sound to be played and let them use a Sound method.