Video

You can load video assets in the asset manager or use:

// Load a video using the asset name in the project
let videoObject = await Video("assetName", null, null);

// Load a video using an asset name tied to any scene
let videoObject = await Video("assetKey", null, null);

// Load a video from a url
let videoObject = await Video(null, "https://someurl.com", null);

// Make an existing object use the video as it's map texture
let videoObject = await Video("assetName", null, videoObject);

To play or pause you can call:

videoObject.play();
videoObject.pause();

// or directly call on the video HTML element, though you will need to make
// sure that the element has loaded before calling these
videoObject.video.play();
videoObject.video.pause();
videoObject.video.currentTime = 30;

videoObject.videoLoaded = true / false; // updated when element is ready