Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demos stopped working #84

Open
piotrjaw opened this issue Jan 10, 2019 · 3 comments
Open

Demos stopped working #84

piotrjaw opened this issue Jan 10, 2019 · 3 comments

Comments

@piotrjaw
Copy link

piotrjaw commented Jan 10, 2019

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

screenshot 2019-01-10 at 20 42 33

screenshot 2019-01-10 at 20 50 23

@piotrjaw
Copy link
Author

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 :(

@donaldr
Copy link

donaldr commented May 10, 2020

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.

@lubosmato
Copy link

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 :(

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants