HTML音频元素如何重播? [英] HTML audio Element how to replay?
问题描述
我设置了一个包含节点的HTML5页面。
该页面将播放音乐(mp3格式),但它只是播放声音结束,而我使用javascript来控制音频元素,即使如此,我无法播放它,只能停止。
HTML5音频元素是否支持REPLAY? =http://www.position-absolute.com/articles/introduction-to-the-html5-audio-tag-javascript-manipulation/ =noreferrer> http://www.position-absolute.com / articles / introduction-to-the-html5-audio-tag-javascript-manipulation /
和重播事件
您可以设置选项,重放点击
audioElement.currentTime = 0;
audioElement.play();
I setup a HTML5 page, that include a node. The page will to playing a music(mp3 format),but it just play sound to end, and I use javascript to control audio element,even so,I can't replay it and only STOP.
Does HTML5 audio Element support REPLAY? And how to?
please read this
and for replay event
you can set option, on replay click
audioElement.currentTime=0;
audioElement.play();
这篇关于HTML音频元素如何重播?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!