Monogatari Documentation
HomepageGitHubDiscordTwitter
master
master
  • Welcome
  • Getting Started
    • Step 1: Setup Your Environment
    • Step 2: Download Monogatari
    • Step 3: Get Familiarized
    • Step 4: Make Your First Visual Novel
  • Upgrading from v1.4.1
  • F.A.Q.
  • Diagnosing Errors
  • Building Blocks
    • Script & Labels
    • Characters
    • Variables & Data Storage
    • Actions
      • Life Cycle
    • Components
      • Life Cycle
      • Built-in Properties
      • Built-in Functions
  • Script Actions
    • Choices
    • Clear
    • Conditionals
    • Dialogs
    • End
    • Gallery
    • Hide Canvas
    • Hide Character
    • Hide Image
    • Hide Particles
    • Hide Video
    • Input
    • Functions
    • Jump
    • Next
    • Placeholder
    • Play Music
    • Play Sound
    • Play Voice
    • Show Canvas
    • Show Background
    • Show Character
    • Show Image
    • Show Message
    • Show Notification
    • Show Particles
    • Show Scene
    • Show Video
    • Stop Music
    • Stop Sound
    • Stop Voice
    • Vibrate
    • Wait
  • Components
    • Credits Screen
    • Quick Menu
    • Loading Screen
    • Main Screen
    • Choice Container
    • Save Slot
    • Text-Box
  • Configuration Options
    • Game Configuration
      • Asset Preloading
      • Internationalization
      • Saving
      • Skip Main Menu
      • Storage
    • Player Preferences
    • Split Files
  • Style & Design
    • Responsiveness
    • CSS Classes
    • HTML Data Attributes
    • Icons
    • Image Menus
  • Releasing Your Game
    • Chrome App
    • Desktop App
    • Mobile
    • Web
  • Advanced: Monogatari Development
    • Core Libraries
      • Artemis
      • Kayros
      • Pandora
    • Actions
    • Components
    • Translations
    • Events
  • Releases
    • v2.0.0.alpha.8
    • v2.0.0.alpha.7
    • v2.0.0.alpha.6
    • v2.0.0.alpha.5
    • v2.0.0.alpha.4
    • v2.0.0.alpha.3
Powered by GitBook
On this page
  • Description
  • Parameters
  • Properties
  • Assets Declarations
  • Supported Formats
  • Examples

Was this helpful?

  1. Script Actions

Show Video

Description

'show video <video_id> <mode> [with [properties]]'

The video action allows you to show videos on your novel in different modes.

Action ID: Video

Reversible: Yes

Requires User Interaction: No, unless the close property is not given, then the user will have to click once the video is over to advance.

Parameters

Name

Type

Description

mode

string

Defines what way you want to show the video like.

Possible Values:

  • modal - Shows the video as a

  • immersive - Shows the video covering the full game screen

  • background - Shows the video as a background for your characters

  • fullscreen - Attempts to show the video in full screen, if permission is denied, it will fallback to the immersive mode.

video_id

string

The ID of a video asset previously defined.

Properties

The following is a comprehensive list of the properties available for you to modify certain behaviors of the video action.

Name

Type

Description

controls

No value required

Optional. Adding this property will make the video controls (play, pause, seeking) visible for the player.

close

No value required

Optional. Adding this property will make the video close itself once it's over.

loop

No value required

Optional. Adding this property will make the video loop. The close property will not have any effect if the loop property is added.

Assets Declarations

To play a video, you must first add the file to your assets/video/ directory and then declare it. To do so, Monogatari has an has a function that will let you declare all kinds of assets for your game.

Monogatari.assets ('videos', {
    '<video_id>': 'videoFileName'
});

Supported Formats

Each browser has it's own format compatibility. MP4 however is the format supported by most browsers.

Examples

Monogatari.script ({
    'Start': [
        'show video flowerTimelapse modal'
        'end'
    ]
});
Monogatari.assets ('video', {
    '<video_id>': 'videoFileName'
});
PreviousShow SceneNextStop Music

Last updated 4 years ago

Was this helpful?

If you wish to use other formats, you can check a to discover what browsers will be able to play it.

compatibility table