mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
fix: throttle request issue per video,audio as indicated requirements in units and lessons
Signed-off-by: rgrgogu <obsequio.rus@gmail.com>
This commit is contained in:
@@ -151,7 +151,7 @@ export function PreviewBlock({ block, onWatchProgress }) {
|
||||
case "video":
|
||||
return <VideoBlock content={content} readOnly onWatchProgress={withBlockMeta} />;
|
||||
case "text-video":
|
||||
return <TextVideoBlock blockId={id} content={content} readOnly />;
|
||||
return <TextVideoBlock blockId={id} content={content} readOnly onWatchProgress={withBlockMeta} />;
|
||||
case "audio":
|
||||
return <AudioBlock content={content} onWatchProgress={withBlockMeta} />;
|
||||
case "code":
|
||||
|
||||
@@ -33,15 +33,16 @@ export const TYPE_DEFS = {
|
||||
icon: PlayCircle,
|
||||
entityTypes: ["lesson"],
|
||||
// Either block type satisfies this one — it's one aggregate percent across
|
||||
// whichever is playing, unlike watch_video/listen_audio below.
|
||||
requiresBlockTypes: ["video", "audio"],
|
||||
// whichever is playing, unlike watch_video/listen_audio below. text-video counts
|
||||
// as video — same <video> element under the hood, just paired with text.
|
||||
requiresBlockTypes: ["video", "audio", "text-video"],
|
||||
describe: () => "Learner must watch at least the configured percentage of the lesson's video/audio content.",
|
||||
},
|
||||
watch_video: {
|
||||
label: "Finish Watching the Full Video",
|
||||
icon: Video,
|
||||
entityTypes: ["lesson"],
|
||||
requiresBlockTypes: ["video"],
|
||||
requiresBlockTypes: ["video", "text-video"],
|
||||
describe: () => "Learner must watch every video block on this lesson all the way through (100%).",
|
||||
},
|
||||
listen_audio: {
|
||||
|
||||
Reference in New Issue
Block a user