mirror of
https://github.com/randyjc/Rahoot.git
synced 2026-03-14 04:25:35 +01:00
adding manager UI and audio and video (youtube) questions
This commit is contained in:
@@ -17,6 +17,7 @@ export type Quizz = {
|
||||
questions: {
|
||||
question: string
|
||||
image?: string
|
||||
media?: QuestionMedia
|
||||
answers: string[]
|
||||
solution: number
|
||||
cooldown: number
|
||||
@@ -24,6 +25,12 @@ export type Quizz = {
|
||||
}[]
|
||||
}
|
||||
|
||||
export type QuestionMedia =
|
||||
| { type: "image"; url: string }
|
||||
| { type: "audio"; url: string }
|
||||
| { type: "video"; url: string }
|
||||
| { type: "youtube"; url: string }
|
||||
|
||||
export type QuizzWithId = Quizz & { id: string }
|
||||
|
||||
export type GameUpdateQuestion = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Player } from "."
|
||||
import { Player, QuestionMedia } from "."
|
||||
|
||||
export const STATUS = {
|
||||
SHOW_ROOM: "SHOW_ROOM",
|
||||
@@ -18,11 +18,17 @@ export type Status = (typeof STATUS)[keyof typeof STATUS]
|
||||
export type CommonStatusDataMap = {
|
||||
SHOW_START: { time: number; subject: string }
|
||||
SHOW_PREPARED: { totalAnswers: number; questionNumber: number }
|
||||
SHOW_QUESTION: { question: string; image?: string; cooldown: number }
|
||||
SHOW_QUESTION: {
|
||||
question: string
|
||||
image?: string
|
||||
media?: QuestionMedia
|
||||
cooldown: number
|
||||
}
|
||||
SELECT_ANSWER: {
|
||||
question: string
|
||||
answers: string[]
|
||||
image?: string
|
||||
media?: QuestionMedia
|
||||
time: number
|
||||
totalPlayer: number
|
||||
}
|
||||
@@ -46,6 +52,7 @@ type ManagerExtraStatus = {
|
||||
correct: number
|
||||
answers: string[]
|
||||
image?: string
|
||||
media?: QuestionMedia
|
||||
}
|
||||
SHOW_LEADERBOARD: { oldLeaderboard: Player[]; leaderboard: Player[] }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user