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.
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 sourceVideo.initialize(width, height)
Initializes the video system.
Details
Initializes the video system.
_createElement
static internal sourceVideo._createElement()
Creates the element. (Same as the RPG Maker MZ method of this name.)
_setupEventHandlers
static internal sourceVideo._setupEventHandlers()
Setup event handlers. (Same as the RPG Maker MZ method of this name.)
Checks (True / False)
isPlaying
static sourceVideo.isPlaying()
Checks whether the video is playing.
Details
Checks whether the video is playing.
_isVisible
static internal sourceVideo._isVisible()
Whether it is visible. (Same as the RPG Maker MZ method of this name.)
Actions
play
static sourceVideo.play(src)
Starts playback of a video.
Details
Starts playback of a video.
setVolume
static sourceVideo.setVolume(volume)
Sets the volume for videos.
Details
Sets the volume for videos.
Events, Commands & Input
_onLoad
static internal sourceVideo._onLoad()
Called when load happens. (Same as the RPG Maker MZ method of this name.)
_onError
static internal sourceVideo._onError()
Called when error happens. (Same as the RPG Maker MZ method of this name.)
_onEnd
static internal sourceVideo._onEnd()
Called when end happens. (Same as the RPG Maker MZ method of this name.)
_onUserGesture
static internal sourceVideo._onUserGesture()
Called when user gesture happens. (Same as the RPG Maker MZ method of this name.)
Updating & Drawing
_updateVisibility
static internal sourceVideo._updateVisibility(videoVisible)
Updates the visibility each frame. (Same as the RPG Maker MZ method of this name.)
Other
resize
static sourceVideo.resize(width, height)
Changes the display size of the video.
Details
Changes the display size of the video.