|
@@ -308,14 +308,13 @@
|
|
});
|
|
});
|
|
|
|
|
|
//Audio element custom UI listeners
|
|
//Audio element custom UI listeners
|
|
- $("#progressControl").on("click",function(e){
|
|
|
|
|
|
+ document.getElementById("progressControl").addEventListener("click",function(e){
|
|
//Click on the progress control bar, update the audio playing location
|
|
//Click on the progress control bar, update the audio playing location
|
|
var x = e.pageX - $('#progressControl').offset().left;
|
|
var x = e.pageX - $('#progressControl').offset().left;
|
|
var w = $("#progressControl").width();
|
|
var w = $("#progressControl").width();
|
|
var alength = player.duration;
|
|
var alength = player.duration;
|
|
var targetPos = (x / w * alength);
|
|
var targetPos = (x / w * alength);
|
|
player.currentTime = targetPos;
|
|
player.currentTime = targetPos;
|
|
- console.log(x,w,targetPos);
|
|
|
|
});
|
|
});
|
|
|
|
|
|
player.addEventListener("timeupdate", function(){
|
|
player.addEventListener("timeupdate", function(){
|