A flag for whether video playback is currently locked by awaiting a user gesture
A user gesture must be registered before video playback can begin. This Set records the video elements which await such a gesture.
A mapping of base64 video thumbnail images
Register an event listener to await the first mousemove gesture and begin playback once observed A user interaction must involve a mouse click or keypress. Listen for any of these events, and handle the first observed gesture.
Clone a video texture so that it can be played independently of the original base texture.
The video element source
An unlinked PIXI.Texture which can be played independently
Create and cache a static thumbnail to use for the video. The thumbnail is cached using the video file path or URL.
The source video URL
Thumbnail creation options, including width and height
The created and cached base64 thumbnail image, or a placeholder image if the canvas is disabled and no thumbnail can be generated.
Return the HTML element which provides the source for a loaded texture.
The rendered mesh
The source HTML element
Get the video element source corresponding to a Sprite or SpriteMesh.
The PIXI source
The source video element or null
Take a URL to a YouTube video and convert it into a URL suitable for embedding in a YouTube iframe.
The URL to convert.
YouTube player parameters.
The YouTube embed URL.
Retrieve a YouTube video ID from a URL.
The URL.
Lazily-load the YouTube API and retrieve a Player instance for a given iframe.
The iframe ID.
A player config object. See https://developers.google.com/youtube/iframe_api_reference for reference.
Test a URL to see if it points to a YouTube video.
The URL to test.
Play a single video source If playback is not yet enabled, add the video to the pending queue
The VIDEO element to play
Optional
options: { loop?: boolean; offset?: number; playing?: boolean; volume?: number } = {}Additional options for modifying video playback
Optional
loop?: booleanShould the video loop?
Optional
offset?: numberA specific timestamp between 0 and the video duration to begin playback
Optional
playing?: booleanShould the video be playing? Otherwise, it will be paused
Optional
volume?: numberDesired volume level of the video's audio channel (if any)
Stop a single video source
The VIDEO element to stop
Static
hasCheck if a source has a video extension.
The source.
If the source has a video extension or not.
A helper class to provide common functionality for working with HTML5 video objects A singleton instance of this class is available as
game.video