Skip to content
GitHub1.1k

Media

A question can come with one image, audio file or video, shown on the main screen while players answer.

In the quiz editor, add a media to a question and upload a file from your computer. Razzia stores it in the config/media folder and serves it at /media/<name>.

Supported formats:

Type Formats
Image PNG, JPEG, WebP, GIF
Audio MP3, OGG, WAV
Video MP4, WebM

Files can weigh up to 100 MB. Razzia checks the actual content of the file, not its extension, so a renamed file of another type is refused.

Instead of uploading a file, you can use the URL of a file hosted elsewhere. In JSON, set media with the type and the URL:

{
"question": "Which monument is this?",
"answers": ["Big Ben", "Eiffel Tower", "Colosseum", "Taj Mahal"],
"solutions": [1],
"media": {
"type": "image",
"url": "https://example.com/monument.jpg"
},
"cooldown": 5,
"time": 20
}
  • type is image, audio or video. Without it, the media isn’t shown.
  • url is either a full http:// or https:// URL, or a /media/... path to a file uploaded from the editor.

Uploaded files can be deleted from the editor. The file is removed from the quiz you are editing, but other quizzes that use it are not updated: their questions point to a missing file and no longer show it.