<video id='myVideo' controls autoplay>
<source src='a.mp4#t=00:00:00' type=video/mp4>
</video>
如何在 php 中获取 html5 视频的观看时间并将其存储到 php 变量中,而无需任何外部软件?
最佳答案
如果我收到您的问题,您想知道视频开始后耗时。解决办法在这里
$(document).ready(function(){
$("#myvideo").on(
"timeupdate",
function(event){
onTrackedVideoFrame(this.currentTime, this.duration);
});
});
function onTrackedVideoFrame(currentTime, duration){
/* Here you can get both currentTIme and duration */
}
关于javascript - 如何在没有任何外部软件的情况下在php中获取html5视频的观看时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49333077/