当我尝试从本地后端播放音频或从站点上载的音频时,我不断收到此错误。无论是什么文件格式,这都是我得到的,而且这只发生在 ios
错误:Possible Unhandled Promise Rejection (id: 0): Error: The server is not correctly configured. - The AVPlayerItem instance has failed with the error code -11850 and domain "AVFoundationErrorDomain". Error: The server is not correctly configured. - The AVPlayerItem instance has failed with the error code -11850 and domain "AVFoundationErrorDomain".
错误图像
const player = new Audio.Sound();
player.loadAsync({ uri: url }, initialStatus).then(() => {
player.playAsync().then((playbackStatus) => {
if (playbackStatus.error) {
handlePlaybackError(playbackStatus.error);
}
});
});
添加更多错误处理后,我发现错误来自 loadAsync,并且仅在我尝试从本地后端服务器播放音频时才会发生。(ex: http://127.0.0.1:8000/media/audios/2021/08/08/27/21/filename.mp4)
如果我能在这方面得到帮助,那就太好了,在此先感谢!更新:提供更多代码