我想在视频播放5分钟的时候执行js代码
下面js可以获取到视频的播放时间,但优酷是用iframe加载取不到视频的地址。
<script>
onload = function(){
ado.addEventListener("timeupdate",function(){
console.log(this.currentTime);
document.getElementById("showlast1").innerHTML=this.currentTime;
});
ado.addEventListener("loadedmetadata",function(){
this.play();
});
}
</script>