jeromeetienne / threex.webar

three.js extensions for Augmented Reality
http://jeromeetienne.github.io/threex.webar/examples/basic.html
313 stars 81 forks source link

Fix: MediaStreamTrack.getSources #12

Open loristissino opened 7 years ago

loristissino commented 7 years ago

MediaStreamTrack.getSources() was deprecated and then removed: using it causes the error "MediaStreamTrack.getSources is not a function"

Replacing it with navigator.mediaDevices.enumerateDevices() fixes the problem.

See https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices