Video
This page is under construction.
Beta feature, subject to change.
Video is an element that allows you to play a video.
The video is full-size of the player.
const video = new Video({
src: "https://example.com/video.mp4",
muted: true,
});
scene.action([
video
.show()
.play()
.hide(),
]);Public Methods
constructor
config: Partial<VideoConfig>- VideoConfig
Chainable Methods
show
Show the video.
video.show();hide
Hide the video.
play
Play the video and wait for it to finish.
video.play();pause
Pause the video, keeping its current position.
video.pause();resume
Resume playback from the current position. Unlike play, this does not wait for the video to finish.
video.resume();stop
Stop the video: pause it and end any pending play() so the story continues.
video.stop();seek
time: number- The time, in seconds, to seek to.
Seek to a specific time.
video.seek(3);