jsfeat
jsfeat copied to clipboard
Demos stopped working
Hi, it seems that the demos stopped working at all, there seems to be a problem with the MediaStream:


OK so it seems that calling URL.createObjectURL
with a MediaStream
is deprecated, but all you need to do is to replace:
video.src = compatibility.URL.createObjectURL(stream);
with:
video.srcObject = stream;
and it should work just fine. Would do it myself, but I don't see the demos sourcecode here :(
Hard to know if I should use this library without seeing a demo. And yes, I realize I can download it and run it locally, but it would be so much easier if this simple change was made.
OK so it seems that calling
URL.createObjectURL
with aMediaStream
is deprecated, but all you need to do is to replace:video.src = compatibility.URL.createObjectURL(stream);
with:
video.srcObject = stream;
and it should work just fine. Would do it myself, but I don't see the demos sourcecode here :(
Exactly. https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL#Usage_notes
Important: If you still have code that relies on createObjectURL() to attach streams to media elements, you need to update your code to simply set srcObject to the MediaStream directly.