feat: show quiz in between videos

This commit is contained in:
Jannat Patel
2025-05-30 13:00:00 +05:30
parent ade47b4e83
commit 60334ca04a
6 changed files with 284 additions and 75 deletions

View File

@@ -46,7 +46,13 @@ export class Upload {
if (this.isVideo(file.file_type)) {
const app = createApp(VideoBlock, {
file: file.file_url,
readOnly: this.readOnly,
saveQuizzes: (quizzes) => {
if (this.readOnly) return
this.data.quizzes = quizzes
},
})
app.use(translationPlugin)
app.mount(this.wrapper)
return
} else if (this.isAudio(file.file_type)) {
@@ -93,6 +99,7 @@ export class Upload {
return {
file_url: this.data.file_url,
file_type: this.data.file_type,
quizzes: this.data.quizzes || [],
}
}