Raghavender Mylagary Posted March 23, 2017 Share Posted March 23, 2017 Hi @Deltakosh @Wingnut @JCPalmer, Is there any way we can show youtube or any live stream video as a texture? http://www.babylonjs-playground.com/#140LZL#9 Is it possible to draw iframe on to the canvas element of the dynamic texture or is it possible to use the video element of video texture to render the livestream? Thanks -Raghavender Mylagary Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 29, 2017 Share Posted March 29, 2017 Hi RM. No replies yet, huh? Sorry. I have not seen this done, yet. I will try to research more. http://learningthreejs.com/blog/2012/02/07/live-video-in-webgl/ Apparently it is possible... with big crowbars. Raghavender Mylagary 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 31, 2017 Share Posted March 31, 2017 We support webCam: BABYLON.VideoTexture.CreateFromWebCam(scene, function(videoTexture) { }, { maxWidth: 256, maxHeight: 256 }); For live stream this should work directly if you use the right url for VideoTexture: texture = new BABYLON.VideoTexture("video", ["Scenes/Flat2009/babylonjs.mp4", "Scenes/Flat2009/babylonjs.webm"], scene, true); Quote Link to comment Share on other sites More sharing options...
Raghavender Mylagary Posted April 1, 2017 Author Share Posted April 1, 2017 @Deltakosh For live streaming of YouTube videos, if we use url of the video as source for VideoTexture it's not working. YouTube videos works in iFrame. Is there a way we can do that? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 1, 2017 Share Posted April 1, 2017 nope unfortunately. We need a video element attached to the page Quote Link to comment Share on other sites More sharing options...
Raghavender Mylagary Posted April 5, 2017 Author Share Posted April 5, 2017 On 3/31/2017 at 6:31 PM, Deltakosh said: We support webCam: BABYLON.VideoTexture.CreateFromWebCam(scene, function(videoTexture) { }, { maxWidth: 256, maxHeight: 256 }); For live stream this should work directly if you use the right url for VideoTexture: texture = new BABYLON.VideoTexture("video", ["Scenes/Flat2009/babylonjs.mp4", "Scenes/Flat2009/babylonjs.webm"], scene, true); @Deltakosh I tried to set correct url for VideoTexture but its not working http://www.babylonjs-playground.com/#1P9EED#0 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 5, 2017 Share Posted April 5, 2017 Check the console Quote Link to comment Share on other sites More sharing options...
Raghavender Mylagary Posted April 5, 2017 Author Share Posted April 5, 2017 @Deltakosh If I load the URL http://clips.vorwaerts-gmbh.de/big_buck_bunny.webm in a new browser the stream is working. Is there any way to overcome permission denied error? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 5, 2017 Share Posted April 5, 2017 It is a design done on server side (CORS probably: edit your server settings to allow anonymous access to this video) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 5, 2017 Share Posted April 5, 2017 For the permission denied, just try using https for the playground: https://www.babylonjs-playground.com/#1P9EED#0 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.