Auto Submit

dev_local_v9_test4
autosubmit 10 months ago
parent 03494fb352
commit 0d54f24715

@ -332,50 +332,54 @@ var regex = /(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;
durationEl.current.setAttribute('datetime', "".concat(time.hour > 0 ? ' ' + time.hour + ' ' : '').concat(time.minutes, "m ").concat(time.seconds, "s"));
}
function onTimeupdate() {
var videoDuration = Math.round(el.current.duration);
seekEl.current.setAttribute('max', videoDuration);
progressBarEl.current.setAttribute('max', videoDuration);
var time = formatTime(videoDuration);
durationEl.current.innerText = "".concat(time.hour > 0 ? time.hour + ':' : '').concat(time.minutes, ":").concat(time.seconds);
durationEl.current.setAttribute('datetime', "".concat(time.hour > 0 ? ' ' + time.hour + ' ' : '').concat(time.minutes, "m ").concat(time.seconds, "s"));
updateProgress();
updateTimeElapsed();
var _watermarkRef$current = watermarkRef.current.getBoundingClientRect(),
width = _watermarkRef$current.width,
height = _watermarkRef$current.height,
x = _watermarkRef$current.x,
y = _watermarkRef$current.y;
if (x < 0 || y < 0 || !width) {
// el.current.src = '';
// el.current.pause();
// message.warning({
// content: '当前操作非法,已禁止观看视频',
// key: 'watermarkRef',
// });
return;
}
if (!isSeeking) {
var newTime = el.current.currentTime;
var timeDiff = newTime - lastUpdatedTime;
//currenttime update before Seeking & Seeked fired
if (Math.abs(timeDiff) < 10) {
sumTimePlayed += Math.abs(timeDiff);
lastUpdatedTime = newTime;
if (!isLoging) {
if (sumTimePlayed - logCount * timeTick >= 0) {
logCount++;
pos.push(lastUpdatedTime);
if (toLog) {
log();
try {
var videoDuration = Math.round(el.current.duration);
seekEl.current.setAttribute('max', videoDuration);
progressBarEl.current.setAttribute('max', videoDuration);
var time = formatTime(videoDuration);
durationEl.current.innerText = "".concat(time.hour > 0 ? time.hour + ':' : '').concat(time.minutes, ":").concat(time.seconds);
durationEl.current.setAttribute('datetime', "".concat(time.hour > 0 ? ' ' + time.hour + ' ' : '').concat(time.minutes, "m ").concat(time.seconds, "s"));
updateProgress();
updateTimeElapsed();
var _watermarkRef$current = watermarkRef.current.getBoundingClientRect(),
width = _watermarkRef$current.width,
height = _watermarkRef$current.height,
x = _watermarkRef$current.x,
y = _watermarkRef$current.y;
if (x < 0 || y < 0 || !width) {
// el.current.src = '';
// el.current.pause();
// message.warning({
// content: '当前操作非法,已禁止观看视频',
// key: 'watermarkRef',
// });
// return;
}
if (!isSeeking) {
var newTime = el.current.currentTime;
var timeDiff = newTime - lastUpdatedTime;
//currenttime update before Seeking & Seeked fired
if (Math.abs(timeDiff) < 10) {
sumTimePlayed += Math.abs(timeDiff);
lastUpdatedTime = newTime;
if (!isLoging) {
if (sumTimePlayed - logCount * timeTick >= 0) {
logCount++;
pos.push(lastUpdatedTime);
if (toLog) {
log();
}
}
}
}
} else {
lastUpdatedTime = newTime;
if (toLog) {
log();
} else {
lastUpdatedTime = newTime;
if (toLog) {
log();
}
}
}
} catch (error) {
console.log("videoplaying:", error);
}
}
function onSeeking() {

@ -26,7 +26,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.69cce639.js"></script>
<script src="/react/build/umi.097a7faa.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -407,50 +407,54 @@ var regex = /(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;
durationEl.current.setAttribute('datetime', "".concat(time.hour > 0 ? ' ' + time.hour + ' ' : '').concat(time.minutes, "m ").concat(time.seconds, "s"));
}
function onTimeupdate() {
var videoDuration = Math.round(el.current.duration);
seekEl.current.setAttribute('max', videoDuration);
progressBarEl.current.setAttribute('max', videoDuration);
var time = formatTime(videoDuration);
durationEl.current.innerText = "".concat(time.hour > 0 ? time.hour + ':' : '').concat(time.minutes, ":").concat(time.seconds);
durationEl.current.setAttribute('datetime', "".concat(time.hour > 0 ? ' ' + time.hour + ' ' : '').concat(time.minutes, "m ").concat(time.seconds, "s"));
updateProgress();
updateTimeElapsed();
var _watermarkRef$current = watermarkRef.current.getBoundingClientRect(),
width = _watermarkRef$current.width,
height = _watermarkRef$current.height,
x = _watermarkRef$current.x,
y = _watermarkRef$current.y;
if (x < 0 || y < 0 || !width) {
// el.current.src = '';
// el.current.pause();
// message.warning({
// content: '当前操作非法,已禁止观看视频',
// key: 'watermarkRef',
// });
return;
}
if (!isSeeking) {
var newTime = el.current.currentTime;
var timeDiff = newTime - lastUpdatedTime;
//currenttime update before Seeking & Seeked fired
if (Math.abs(timeDiff) < 10) {
sumTimePlayed += Math.abs(timeDiff);
lastUpdatedTime = newTime;
if (!isLoging) {
if (sumTimePlayed - logCount * timeTick >= 0) {
logCount++;
pos.push(lastUpdatedTime);
if (toLog) {
log();
try {
var videoDuration = Math.round(el.current.duration);
seekEl.current.setAttribute('max', videoDuration);
progressBarEl.current.setAttribute('max', videoDuration);
var time = formatTime(videoDuration);
durationEl.current.innerText = "".concat(time.hour > 0 ? time.hour + ':' : '').concat(time.minutes, ":").concat(time.seconds);
durationEl.current.setAttribute('datetime', "".concat(time.hour > 0 ? ' ' + time.hour + ' ' : '').concat(time.minutes, "m ").concat(time.seconds, "s"));
updateProgress();
updateTimeElapsed();
var _watermarkRef$current = watermarkRef.current.getBoundingClientRect(),
width = _watermarkRef$current.width,
height = _watermarkRef$current.height,
x = _watermarkRef$current.x,
y = _watermarkRef$current.y;
if (x < 0 || y < 0 || !width) {
// el.current.src = '';
// el.current.pause();
// message.warning({
// content: '当前操作非法,已禁止观看视频',
// key: 'watermarkRef',
// });
// return;
}
if (!isSeeking) {
var newTime = el.current.currentTime;
var timeDiff = newTime - lastUpdatedTime;
//currenttime update before Seeking & Seeked fired
if (Math.abs(timeDiff) < 10) {
sumTimePlayed += Math.abs(timeDiff);
lastUpdatedTime = newTime;
if (!isLoging) {
if (sumTimePlayed - logCount * timeTick >= 0) {
logCount++;
pos.push(lastUpdatedTime);
if (toLog) {
log();
}
}
}
}
} else {
lastUpdatedTime = newTime;
if (toLog) {
log();
} else {
lastUpdatedTime = newTime;
if (toLog) {
log();
}
}
}
} catch (error) {
console.log("videoplaying:", error);
}
}
function onSeeking() {

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save