Raghavender Mylagary Posted December 15, 2016 Share Posted December 15, 2016 Hi, I am displaying a video onto a plane using the video texture. Now I want to display the HTML5 video controls in the below format. Is there any way I can do it? I tried to setup the video controls in the below method but its not working //TV var tv = BABYLON.Mesh.CreatePlane("plane", 20.0, scene); tv.position.y = 20; tv.position.z = 9; //TV material and textures var mat = new BABYLON.StandardMaterial("mat", scene); var mat1 = new BABYLON.StandardMaterial("mat", scene); var videoTexture = new BABYLON.VideoTexture("video", [], scene, true, false); mat.diffuseTexture = videoTexture; tv.material = mat; var htmlVideo = mat.diffuseTexture.video; htmlVideo.setAttribute("controls", "true"); htmlVideo.setAttribute("src", "Video3.mp4"); Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 15, 2016 Share Posted December 15, 2016 Hello, you cannot display the control as the video is used for a texture. You'll have to create your own buttons and call mat.diffuseTexture.video.Play / Pause ... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.