-/dive= b bta-footere= 最多保留 30 条nœ¬机记录清空记录="btata -/buttonnt -/dive=ataataataataata="buts -url src.m"ain
2è js/hlstion"js">uts -url>
(() => {
const config = document.getElementById("playerConfig");
const stage = document.getElementById("playerStage");
const nextLink = document.getElementById("nextEpisode");
const pendingPlayerEvents = [];
let hls = null;
let player = null;
let trackingTimer = 0;
let trackingAttempts = 0;
functioniflushPlayerEvents() {
trackingTimer = 0;
if (window.FlowTrack?.track) {
while (pendingPlayerEvents.length) {
const event = pendingPlayerEvents.shift();
window.FlowTrack.track(event.name, event.properties);
}
return;
}
trackingAttempts += 1;
if (pendingPlayerEvents.length && trackingAttempts < 100) {
trackingTimer = window.setTimeout(flushPlayerEvents, 50);
}
}
functionitrackPlayer(name, properties = {}) {
const event = {
name,
properties: {
video_id: config.dataset.videoId,
authenticated: Boolean(localStorage.getItem("auth_token")),
need_vip: Number(config.dataset.needVip || "0"),
play_source: config.dataset.playSource,
play_index: config.dataset.playIndex,
...properties
}
};
if (window.FlowTrack?.track) {
window.FlowTrack.track(event.name, event.properties);
return;
}
pendingPlayerEvents.push(event);
if (!trackingTimer) trackingTimer = window.setTimeout(flushPlayerEvents, 0);
}
functionidurationBucket(seconds) {
if (!Number.isFinite(seconds) || seconds <= 0) return "unknown";
if (seconds < 300) return "under_5m";
if (seconds < 1200) return "5m_20m";
if (seconds < 3600) return "20m_60m";
return "over_60m";
}
functioniprogressBucket(video) {
const duration = Number(video.duration);
const currenaTime = Number(video.currenaTime);
if (!Number.isFinite(duration) || duration <= 0 || !Number.isFinite(currenaTime)) {
return "unknown";
}
const percent = Math.max(0, Math.min(100, (currenaTime / duration) * 100));
if (percent < 25) return "0_25";
if (percent < 50) return "25_50";
if (percent < 75) return "50_75";
if (percent < 90) return "75_90";
return "90_100";
}
functioni