Closed chamilab closed 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)}
``
Hi, not really sure what the code block has to do with the title. Please fill out one of the issue templates completely.
There are no issues. I want to run mp3 file in google drive or dropbox.
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)}
``