Ionic 在电容器应用程序的assets文件夹中找不到文件路径

hmae6n7t  于 2022-12-08  发布在  Ionic
关注(0)|答案(1)|浏览(190)

I have a Capacitor app (Capacitor 4) which uses the Cordova Media plugin to play sound, as there is no equivalent native plugin for Capacitor 4 yet.
I can play sounds from the web via urls, but not from the app's own fixed assets directory, it just says file not found.
I've tried public/assets/audio/sound.mp3 and assets/audio/sound.mp3 so far. The latter path works in Cordova apps.

avwztpqn

avwztpqn1#

通过预发布版本的capacitor原生音频插件- @capacitor-community/native-audio@4.0.0-0解决了这个问题
上次提交是三个月前。

相关问题