'show video <video_id> <mode> [with <properties>]'
The video action allows you to show videos in your visual novel in different display modes.
Action ID: Video
Reversible: Yes
Requires User Interaction: Depends on mode and properties. Blocking modes (modal, immersive, fullscreen) wait for video completion unless close property is used.
Parameters
Name
Type
Description
video_id
string
The ID of a video asset previously declared
mode
string
Display mode: modal, displayable, background, immersive, or fullscreen
Display Modes
Mode
Description
Blocks Game
modal
Shows video in a modal overlay
Yes
displayable
Shows video as an element on the game screen
No
background
Shows video as the background behind characters
No
immersive
Covers the full game screen
Yes
fullscreen
Attempts fullscreen mode (falls back to immersive if denied)
Yes
Properties
Property
Description
controls
Shows video controls (play, pause, seeking) to the player
close
Automatically removes the video when it ends
loop
Makes the video loop continuously (overrides close)
Asset Declaration
To play a video, add the file to your assets/videos/ directory and declare it:
Supported Formats
MP4 is recommended for maximum browser compatibility. Other formats:
monogatari.script({
'Start': [
'show video intro modal',
'The intro has finished.',
'end'
]
});
monogatari.script({
'Start': [
'show video rain background with loop',
'e The rain keeps falling...',
'hide video rain',
'end'
]
});
monogatari.script({
'Start': [
'show video cutscene immersive with close',
// Game continues automatically after video ends
'e That was intense!',
'end'
]
});
monogatari.script({
'Start': [
'show video tutorial modal with controls',
'Did you understand the tutorial?',
'end'
]
});
monogatari.script({
'Start': [
'show video ending fullscreen with close',
'Thanks for playing!',
'end'
]
});
monogatari.script({
'Start': [
'show video news_broadcast displayable',
'e Look at what\'s on TV!',
'hide video news_broadcast with fadeOut',
'end'
]
});