Raghavender Mylagary Posted December 13, 2016 Share Posted December 13, 2016 Hi, I am trying to embed a TV into the room i have created. I have created a Cube and then i am loading the video in the form of texture on the cube. Below is the screenshot of the error. @gryff can you help me with this error NewsRoom.rar Quote Link to comment Share on other sites More sharing options...
RaananW Posted December 13, 2016 Share Posted December 13, 2016 Well, there is an error "while trying to load texture: SampleVideo.......mp4". The call stack there will probably get you going. Maybe the file isn't there, maybe your server refuses this mime type, maybe the file is on a non-cors-enabled server, maybe it should be Samplevideo and not SampleVideo. So many reasons! Open the stack on the error, try debugging this. Looking at your .babylon file - the problem is that you try loading a video as the image of a regular diffuse texture. You will need to write some lines of code loading a video texture from the file you defined. As far as I know, the .babylon scene file doesn't support Video Textures. Quote Link to comment Share on other sites More sharing options...
Raghavender Mylagary Posted December 13, 2016 Author Share Posted December 13, 2016 From this code http://www.babylonjs-playground.com/#256QWU#2 i can see that we can load video files as textures. I am using blender to generate the .babylon file. Quote Link to comment Share on other sites More sharing options...
RaananW Posted December 13, 2016 Share Posted December 13, 2016 I didn't say you can't load a video, I said you can't load it in a .babylon file. You will need to write code in order to get that working. Load the scene, and then load the video using a VideoTexture (and not a regular texture) Raghavender Mylagary 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted December 13, 2016 Share Posted December 13, 2016 @Raghavender Mylagary : I know that Blender allows you to load a texture that is an "image or movie" but the exporter thinks you are using an image. As @RaananW you need to specifically set up the video as a certain type of texture (a VideoTexture) in code like : screen.material.diffuseTexture = new BABYLON.VideoTexture("video", ["babylonjs.mp4", "babylonjs.webm"], scene, true); and then you have access to play, pause, loop, autoplay etc. See link below under video. Advanced Texturing cheers, gryff Raghavender Mylagary 1 Quote Link to comment Share on other sites More sharing options...
Raghavender Mylagary Posted December 14, 2016 Author Share Posted December 14, 2016 @gryff thanks for the reply. I want to know if i can use any live streaming video as a video texture? Thanks, Raghavender Mylagary Quote Link to comment Share on other sites More sharing options...
gryff Posted December 14, 2016 Share Posted December 14, 2016 @Raghavender Mylagary : Well I've never used video textures much beyond a quick test - and streaming goes beyond my skillset However, I gather @dbawel does have quite a bit of experience with it, including streaming : Maybe he can help. cheers, gryff Quote Link to comment Share on other sites More sharing options...
Raghavender Mylagary Posted December 15, 2016 Author Share Posted December 15, 2016 @dbawel can you provide an example for streaming a live video as video texture? 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.