peraxel7 Posted January 31, 2017 Share Posted January 31, 2017 Hello, I noticed in the documentation that WebRTC and Webcam support was being added to Babylon 2.6. So I made a simple example where createFromWebCam is applied to a shadermaterial. That would allow custom pixelshaders to filter the webcam stream which could be useful for blob/edge detection in Augmented Reality applications. Everything works fine on localhost so I created a simple Playground for it. However on Chrome I get permission denied. getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details. So I was wondering if there is something I should do differently, if the Playground needs to update to a HTTPS, or if this is only happening to me? I saved the playground http://www.babylonjs-playground.com/#EETLE#0 which for me shows a black plane. (Ctrl + shift + I) to bring up console with warnings on Chrome. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 1, 2017 Share Posted February 1, 2017 Just use https on the playground:) https://www.babylonjs-playground.com/#EETLE#0 peraxel7 1 Quote Link to comment Share on other sites More sharing options...
peraxel7 Posted February 1, 2017 Author Share Posted February 1, 2017 Works perfectly now. Thank You! Quote Link to comment Share on other sites More sharing options...
dbawel Posted February 1, 2017 Share Posted February 1, 2017 @Deltakosh - So is this currently the only method to apply a webcam stream to a material - by using a shader? Also, how might we stream the audio as well? DB Quote Link to comment Share on other sites More sharing options...
peraxel7 Posted February 2, 2017 Author Share Posted February 2, 2017 @dbawel Made a sample that uses a standard material for the video. https://www.babylonjs-playground.com/#LIVJ8#0 In this one I needed to set an emissive color because the scene has no lights. Quote Link to comment Share on other sites More sharing options...
dbawel Posted February 2, 2017 Share Posted February 2, 2017 @peraxel7 - I wish I could take credit for capturing the web cam video, but I believe it was first @MasterSplinter who integrated this using HTML video, but am not 100% certain. Applying to a standard material was the simple part. It's now a feature we can all use in 2.5, and I've personally had great results in using to date as it is so very simple to integrate. Cheers, DB peraxel7 and GameMonetize 2 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.