diff --git a/packages/web/src/components/game/QuestionMedia.tsx b/packages/web/src/components/game/QuestionMedia.tsx index 55fb353..9495b17 100644 --- a/packages/web/src/components/game/QuestionMedia.tsx +++ b/packages/web/src/components/game/QuestionMedia.tsx @@ -14,7 +14,7 @@ const QuestionMedia = ({ media, alt, onPlayChange }: Props) => { return null } - const containerClass = "mx-auto flex w-full max-w-3xl justify-center" + const containerClass = "mx-auto flex w-full max-w-5xl justify-center" switch (media.type) { case "image": @@ -52,7 +52,7 @@ const QuestionMedia = ({ media, alt, onPlayChange }: Props) => { crossOrigin="anonymous" playsInline src={media.url} - className="m-4 w-full max-w-3xl rounded-md shadow-lg" + className="m-4 w-full max-w-5xl rounded-md shadow-lg" preload="metadata" onPlay={() => onPlayChange?.(true)} onPause={() => onPlayChange?.(false)} diff --git a/packages/web/src/components/game/create/QuizEditor.tsx b/packages/web/src/components/game/create/QuizEditor.tsx index 411070a..0a03840 100644 --- a/packages/web/src/components/game/create/QuizEditor.tsx +++ b/packages/web/src/components/game/create/QuizEditor.tsx @@ -258,7 +258,6 @@ const QuizEditor = ({ quizzList, onBack, onListUpdate }: Props) => { } setQuestionMedia(qIndex, nextMedia) - adjustTimingWithMedia(qIndex, nextMedia) } const clearQuestionMedia = (qIndex: number) => { @@ -272,6 +271,7 @@ const QuizEditor = ({ quizzList, onBack, onListUpdate }: Props) => { try { const el = document.createElement(type) + el.crossOrigin = "anonymous" el.preload = "metadata" el.src = url @@ -371,11 +371,6 @@ const QuizEditor = ({ quizzList, onBack, onListUpdate }: Props) => { url: uploaded.url, fileName: uploaded.fileName, }) - adjustTimingWithMedia(qIndex, { - type, - url: uploaded.url, - fileName: uploaded.fileName, - }) toast.success("Media uploaded") refreshMediaLibrary() } catch (error) { @@ -647,26 +642,39 @@ const QuizEditor = ({ quizzList, onBack, onListUpdate }: Props) => { )} - + + Tip: set answer time longer than the clip duration. + + -