【发布时间】:2015-02-02 01:52:47
【问题描述】:
我正在使用 html、jQuery、phonegap 开发 Android 应用程序。
我在这里尝试放置 HTML5 音频播放器。这不适用于 app 文件夹中的本地应用歌曲路径,但是当我放置一个可以正常工作的在线歌曲路径时(例如:http://example.com/audio1.mp3)
在我的编码下方,其中包含有效的在线歌曲网址的路径:
<audio id="audio-player" src="http://example.com/audio1.mp3" type="audio/mp3" controls="controls"></audio>
在我使用本地应用程序路径的编码下方:
<audio id="audio-player" src="/android_asset/www/media/demo.mp3" type="audio/mp3" controls="controls"></audio>
我试图解决这个问题,但没有成功。
【问题讨论】:
标签: android html html5-audio