安卓createInnerAudioContext无法播放音频
https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/wx.createInnerAudioContext.html 上周代码都正常,这周突然无法播放了,怀疑是最新一次依赖库的问题,目前出问题的手机的依赖库版本都为2.24.6。 使用taro写的 const testBuffer = "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA//M4xAATqiXcAGBFLPWJ0xVJQ+i8RCQhxrG4GXoon3F7ELTqt+n9/RxP3pM//tL9pMAyP2RkYk2n/6oUwwwsjt/6uzbs7OwxyKhTFHFkC3qFg2aNf/MaDRnSYNIVUQHhLKyA+nOkAmFIKF5I//M4xBAPuHpIDGGGhEqSFsEOyvKeHYyEY95c/StZr6U3d8+LJZJq1vs/OHC8dYzPp5dRP6vkFXSRDqVTWVqIIHBKF3jmYnAcmlQehOJA+ObYMiglMDDL8J2maENffNzc7UsZcxLW0ad9iN+1//M4xDAPWG5QFGGGSEr1kbNdooO6F7ksu/HKJ7h+gDSMeRKEI9Vn5xBZu2PWfiCSDxpwOjUiMOiBQLvB4AOQpZdfQ8cpbXokmDdd7g8pRDthmLhEfizc+U0E+LLQmonUukYNrm2VAqKFE/lQ//M4xFESmFZIC0wYAKlavBUUp1blYKBDVbn0iDjc1rWZLL4cwS8KgkrN1GkYMZY7xd73Ugg5LGZTJVPV0FU1WQUbue/Vag10kC+S47yGn33WrpuhuXDQTMOWLceBFMh6X+qytmT/poE0KmF7//M4xGUlw85cDZhoAAnYlajAL2IAEgE63Wv1ddDSZNNTKQQW7JjkLB+LA3DAc4ZQn4SMulE+PS///6v//5WfZImJo9Vf////////////////7/jfyyX/H7P49jHxs2vPuN0K2Jk+5Kz7Cw3Q//M4xC0fe0KcAcFYAFki0dhoNgeFiQHgdjZfZw+gxM3nkd66howrJip8uBEod5cmSB0Alg7SJjHuJ4/2bnUigsOghuA4SXGhqNZQIRCgOBoQddDYQ2YmBieBDPG70pE/d/v/ooAZJhFeEinD//M4xA4YSjLu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VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"
const playerRef = useRef(Taro.createInnerAudioContext())
const handle () => {
const fs = Taro.getFileSystemManager()
const path = Taro.env.USER_DATA_PATH + '/test.mp3';
fs.writeFile({
filePath: path,
data: testBuffer,
encoding: 'base64',
success: () => {
console.log('完毕', path)
playerRef.current.autoplay = true
playerRef.current.src = path
}
})
}