jcmellado / js-aruco

JavaScript library for Augmented Reality applications
Other
600 stars 132 forks source link

Camera feed of samples does not work on Safari 11+ #26

Closed brassaro closed 6 years ago

brassaro commented 6 years ago

On Safari 11+, the samples provided do not work: the camera feed does not appear, and there is an exception on the console. It seems like the function 'createOjectURL' is deprecated.

jcmellado commented 6 years ago

Sorry, I can not test on Safari 11. Could you copy here the exception you are seeing on console? WebRTC API was experimental when I started the project. I'll try to update the examples with the new API (getUserMedia, URL, ...).

brassaro commented 6 years ago

Hi, Sorry for the late answer. Here is the console error: Unhandled Promise Rejection: TypeError: Type error @createObjectURL @successCallback @promiseReactionJob

Sounds like the API has changed and now, instead of 'video.src = window.URL.createObjectURL(stream)', we need to use 'video.srcObject = stream'

jcmellado commented 6 years ago

Thanks, I have updated the examples.

Please let me know if they are working for you now.