答案 0 :(得分:1)
您可以使用 React-native-sound 来做到这一点。
示例:
componentDidMount() {
this.sound = new Sound(this.props.urlAudio, null, error => {
console.log("Audio loaded...")
if (!error) {
console.log("Audio starting...")
this._startAudio()
}
})
}
_startAudio() {
this.sound.play(()=> {
console.log("Audio playing....")
})
}