{chapters.map((ch) => {
const chStart = ch.start_frame / TOTAL_FRAMES
const chEnd = (ch.start_frame + ch.duration_frames) / TOTAL_FRAMES
const isActive = progress >= chStart && progress < chEnd
const isPast = progress >= chEnd
const chProgress = isActive ? (progress - chStart) / (chEnd - chStart) : isPast ? 1 : 0
return (
{isActive && (
)}
{ch.label}
)
})}
)
}
// 在主视频组件中添加
export const MyVideo = () => (