|
|
|
@ -17,10 +17,8 @@ function getTotalEffectTime(pos) {
|
|
|
|
|
let v = Math.abs(pos[i + 1] - pos[i])
|
|
|
|
|
if (v < 21) {
|
|
|
|
|
sum += v
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log(pos)
|
|
|
|
|
return sum
|
|
|
|
|
}
|
|
|
|
|
const regex = /(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i
|
|
|
|
@ -132,7 +130,7 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => {
|
|
|
|
|
let newTime = el.current.currentTime
|
|
|
|
|
let timeDiff = newTime - lastUpdatedTime
|
|
|
|
|
//currenttime update before Seeking & Seeked fired
|
|
|
|
|
if (Math.abs(timeDiff) < 0.5) {
|
|
|
|
|
if (Math.abs(timeDiff) < 8) {
|
|
|
|
|
sumTimePlayed += Math.abs(timeDiff)
|
|
|
|
|
lastUpdatedTime = newTime
|
|
|
|
|
if (!isLoging) {
|
|
|
|
|