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.
1条答案
按热度按时间avwztpqn1#
通过预发布版本的capacitor原生音频插件- @capacitor-community/native-audio@4.0.0-0解决了这个问题
上次提交是三个月前。