我正在尝试使用一个非常简单的世博会音频播放器从this repo的播放器与音频文件导入的很好
import AudioFile from '../assets/test.m4a';
AudioFile的console.log返回一个数字
console.log(typeof AudioFile);但是,当我尝试使用从记录器接收的文件uri时,我得到了该文件的uri,如下所示,播放器无法工作。
file:///data/user/0/host.exp.exponent/cache/ExperienceData/%2540madaher%252Fdelivery/Audio/recording-091d5e42-1a82-4e59-8e76-d415ca424c29.m4a有没有人能帮我理解其中的区别?
发布于 2021-02-13 21:59:46
我通过改变await this.soundObject.loadAsync({ uri: this.props.audio })来解决这个问题;而不是await this.soundObject.loadAsync(this.props.audio);希望这能帮助到某人
https://stackoverflow.com/questions/66185442
复制相似问题