Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Game Objects
/
Video
Phaser 4.1.0
Phaser 4 examples
Video
17
examples
Examples
17
Change Video Source
Demonstrates how to dynamically switch the source of a Video Game Object between different preloaded video assets during runtime.
Get First Video Frame
Demonstrates how to use the getFirstFrame method to display the initial frame of a video as a static preview before playback starts.
Load Video From URL
Demonstrates how to create a Video Game Object and load a video file directly via a URL at runtime instead of using the preloader.
Loop Video
This example demonstrates how to play a video on a continuous loop, handle browser autoplay restrictions, and listen for the 'loop' event to track repetitions.
Multiple Video Instances
Learn how to display multiple video Game Objects using the same video asset, each playing independently with a different start time offset.
Multiple Videos
This example demonstrates how to load, display, and play multiple video files simultaneously in a grid layout.
Play Video with Interaction
Demonstrates how to load and play a video file, including handling browser autoplay restrictions and toggling play/pause states via user input.
Stream Video From Webcam
Demonstrates how to capture a user's webcam stream using the browser MediaDevices API and display it within a Phaser Video Game Object.
Transparent Video
Demonstrates playing a transparent WebM video over a background shader and an audio-reactive waveform visualization.
Video as Shader Texture
Demonstrates how to use a playing video as a dynamic input texture for a GLSL shader. It shows how to register a video stream as a texture and pass it as a uniform into a shader object for real-time visual effects.
Video as Sprite Texture
Demonstrates how to use a single playing video as a dynamic texture source for multiple Image Game Objects and multi-pass shaders simultaneously.
Video Controls
Demonstrates how to control video playback in Phaser, including play, pause, and resume functions, as well as tracking progress and seeking to specific timestamps using a slider.
Video On Complete Event
Listen for the 'complete' event on a Video Game Object to trigger actions, such as displaying UI or restarting playback, once a video finishes playing.
Video Seek and Current Time
Demonstrates how to seek forward or backward in a video using relative time values and monitor playback progress.
Video Snapshot
Capture a snapshot of a playing video at its current frame and use it as a texture for an Image game object. This example also demonstrates how to adjust video playback speed.
Video Snapshot Area
Demonstrates how to capture a specific rectangular region of a playing video and apply it as a texture to another Game Object.
Video Transition
Demonstrates how to use a transparent WebM video as a transition layer to swap visibility between two game objects (a shader and another video) at a specific point in the playback.