jqueryはaudioラベルoncanplay,onended,onpauseおよびonplayイベントコールバックを傍受する
783 ワード
audioにも多くのイベント属性があり、これらのイベント属性を利用してこの音楽プレーヤーのオーディオの再生インタラクティブ効果を実現することができる.
例:
Mediaイベントのoncanplayイベント、onendedイベント、onpauseとonplayイベントなど
jQueryでこれらのイベントをリスニングする方法は、次のとおりです.
例:
Mediaイベントのoncanplayイベント、onendedイベント、onpauseとonplayイベントなど
jQueryでこれらのイベントをリスニングする方法は、次のとおりです.
audio "onended" 。
, 。
$(function(){
$('audio').bind('ended', function(){
alert(' ');
})
$('audio').bind('pause', function(){
alert(' ');
})
$('audio').bind('play', function(){
alert(' ');
})
})