Class in reactor_core_io.js

Video

13 functions in 6 groups · hide internal

The Database: everything Core loads at boot.

Familiar territory. Video keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.

The static class that handles video playback.

@namespace
function Video()

Quick Reference

Setup & Creation 3

initialize() Initializes the video system.
_createElement() Creates the element.
_setupEventHandlers() Setup event handlers.

Checks (True / False) 2

isPlaying() Checks whether the video is playing.
_isVisible() Whether it is visible.

Actions 2

play() Starts playback of a video.
setVolume() Sets the volume for videos.

Events, Commands & Input 4

_onLoad() Called when load happens.
_onError() Called when error happens.
_onEnd() Called when end happens.
_onUserGesture() Called when user gesture happens.

Updating & Drawing 1

_updateVisibility() Updates the visibility each frame.

Other 1

resize() Changes the display size of the video.

Setup & Creation

initialize

static source
Video.initialize(width, height)

Initializes the video system.

Details

Initializes the video system.

@param
width number The width of the video.
@param
height number The height of the video.

_createElement

static internal source
Video._createElement()

Creates the element. (Same as the RPG Maker MZ method of this name.)

_setupEventHandlers

static internal source
Video._setupEventHandlers()

Setup event handlers. (Same as the RPG Maker MZ method of this name.)

Checks (True / False)

isPlaying

static source
Video.isPlaying()

Checks whether the video is playing.

Details

Checks whether the video is playing.

@returns
boolean True if the video is playing.

_isVisible

static internal source
Video._isVisible()

Whether it is visible. (Same as the RPG Maker MZ method of this name.)

Actions

play

static source
Video.play(src)

Starts playback of a video.

Details

Starts playback of a video.

@param
src string The url of the video.

setVolume

static source
Video.setVolume(volume)

Sets the volume for videos.

Details

Sets the volume for videos.

@param
volume number The volume for videos (0 to 1).

Events, Commands & Input

_onLoad

static internal source
Video._onLoad()

Called when load happens. (Same as the RPG Maker MZ method of this name.)

_onError

static internal source
Video._onError()

Called when error happens. (Same as the RPG Maker MZ method of this name.)

_onEnd

static internal source
Video._onEnd()

Called when end happens. (Same as the RPG Maker MZ method of this name.)

_onUserGesture

static internal source
Video._onUserGesture()

Called when user gesture happens. (Same as the RPG Maker MZ method of this name.)

Updating & Drawing

_updateVisibility

static internal source
Video._updateVisibility(videoVisible)

Updates the visibility each frame. (Same as the RPG Maker MZ method of this name.)

Other

resize

static source
Video.resize(width, height)

Changes the display size of the video.

Details

Changes the display size of the video.

@param
width number The width of the video.
@param
height number The height of the video.