Video As A Texture


Here is an example from our Flat2009 Demo: Video Texture Example




The internal video DOM object is accessible via the property... which allows you to control some characteristics and monitor the status of the video (things such as play, pause, loop, autoplay, etc). See the link above for the full story.



ecran.material.emissiveColor = new BABYLON.Color3(1, 1, 1);

Mobile devices do not auto-play videos. A user interaction (such as a tap) is required to start the video. Until the user taps, the video texture will be black. A simple way of starting the video is this:

scene.onPointerDown = function () {;




texture.onUserActionRequestedObservable.add(() => {
scene.onPointerDown = function () {;


