|
@ -187,25 +187,39 @@ $(document).ready(function() { |
|
|
<!-- scripts for mouse events --> |
|
|
<!-- scripts for mouse events --> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
function popup_bg(start,end) { |
|
|
// function popup_bg(start,end) { |
|
|
|
|
|
|
|
|
|
|
|
// var myIcon = document.querySelector(".audioBG"); |
|
|
|
|
|
// var box = document.getElementById("audioBG"); |
|
|
|
|
|
// if (box.paused) { |
|
|
|
|
|
// box.currentTime = start; |
|
|
|
|
|
// myIcon.className = "audioBG fa fa-pause"; |
|
|
|
|
|
// setTimeout(function(){ |
|
|
|
|
|
// box.play(); |
|
|
|
|
|
// console.log(box.currentTime); |
|
|
|
|
|
// }, end); |
|
|
|
|
|
// } |
|
|
|
|
|
// // box.currentTime = start; |
|
|
|
|
|
// // console.log(start); |
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function popup_bg(start,end){ |
|
|
var myIcon = document.querySelector(".audioBG"); |
|
|
var myIcon = document.querySelector(".audioBG"); |
|
|
var box = document.getElementById("audioBG"); |
|
|
var box = document.getElementById("audioBG"); |
|
|
if (box.paused) { |
|
|
|
|
|
box.currentTime = start; |
|
|
box.currentTime = start; |
|
|
myIcon.className = "audioBG fa fa-pause"; |
|
|
myIcon.className = "audioBG fa fa-pause"; |
|
|
box.play(); |
|
|
box.play(); |
|
|
console.log(box.currentTime); |
|
|
console.log(box.currentTime); |
|
|
// the below setInterval is to check the currentTime is greater than 56 or not in every 1 second |
|
|
|
|
|
setInterval(function(){ |
|
|
setInterval(function(){ |
|
|
if(box.currentTime>end){ |
|
|
if(box.currentTime>end){ |
|
|
myIcon.className = "audioBG fa fa-play"; |
|
|
myIcon.className = "audioBG fa fa-play"; |
|
|
box.pause(); |
|
|
box.pause(); |
|
|
} |
|
|
} |
|
|
},1000); |
|
|
},1000); |
|
|
}; |
|
|
} |
|
|
// box.currentTime = start; |
|
|
|
|
|
// console.log(start); |
|
|
|
|
|
}; |
|
|
|
|
|
</script> |
|
|
</script> |
|
|
<script> |
|
|
<script> |
|
|
var aud1= document.getElementById('audioBG'); |
|
|
var aud1= document.getElementById('audioBG'); |
|
|