Jump to content

Babylon Playground getUserMedia() Webcam


Recommended Posts

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


which for me shows a black plane. (Ctrl + shift + I) to bring up console with warnings on Chrome.

Link to comment
Share on other sites

@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.



Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...