admin管理员组文章数量:1335854
I used audio tag of HTML5 and put 1 button for download that can any functionality provide by audio tag that we directly download as mp3 file.
<audio id="range" src="audio/1.mp3" type="audio/mp3" controls="controls">
<a href='audio/1.mp3'>DownloadButton</a>
</audio>
//used .play() , .volume() , .pause() working proper
Above functionality i tried but not working which i want. I want just click on button and direct downloaded that audio file. Please tell me if any one know proper way than guide me.!
The Chrome browser is used.
I used audio tag of HTML5 and put 1 button for download that can any functionality provide by audio tag that we directly download as mp3 file.
<audio id="range" src="audio/1.mp3" type="audio/mp3" controls="controls">
<a href='audio/1.mp3'>DownloadButton</a>
</audio>
//used .play() , .volume() , .pause() working proper
Above functionality i tried but not working which i want. I want just click on button and direct downloaded that audio file. Please tell me if any one know proper way than guide me.!
The Chrome browser is used.
Share Improve this question edited Feb 27, 2015 at 8:37 Johan Karlsson 1,1371 gold badge14 silver badges39 bronze badges asked Feb 27, 2015 at 7:29 Gunjan PatelGunjan Patel 2,3724 gold badges26 silver badges51 bronze badges 2- Please elaborate on what you have tried. What browser is also interesting. Different browser might behave different. – Johan Karlsson Commented Feb 27, 2015 at 7:41
- @JohanKarlsson chrome browser – Gunjan Patel Commented Feb 27, 2015 at 7:55
1 Answer
Reset to default 4If you're just going to download the file, you don't need <audio>
tags, which are for playing the file, not downloading, you can of course use both, but the anchor has nothing to do with the audio tag
<audio id="range" src="audio/1.mp3" type="audio/mp3" controls="controls"></audio>
<a href="audio/1.mp3" download="filename.mp3">DownloadButton</a>
本文标签: javascriptHTML5 audio tag in which Download possibleStack Overflow
版权声明:本文标题:javascript - HTML5 audio tag in which Download possible? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742396639a2467057.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论