zmxv / react-native-sound

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

How to run mp3 file on dropbox or google drive file #614

Closed chamilab closed 4 years ago

chamilab commented 4 years ago

playSound(testInfo, component){ const callback = (error, sound) => { if (error) { Alert.alert('error', error.message); return; } testInfo.onPrepared && testInfo.onPrepared(sound, component); sound.play(() => { // Success counts as getting to the end // Release when it's done so we're not using up resources sound.release(); }); }; if (testInfo.isRequire) { const sound = new Sound(testInfo.uri, error => callback(error, sound)); } else { const sound = new Sound(testInfo.uri, testInfo.basePath, error => callback(error, sound)); } }

//renderlist <Button style={design.play_button} onPress={() => this.playSound(item, this)}

``

paulmelnikow commented 4 years ago

Hi, not really sure what the code block has to do with the title. Please fill out one of the issue templates completely.

chamilab commented 4 years ago

There are no issues. I want to run mp3 file in google drive or dropbox.