iodide-project / iodide-examples

example Iodide notebooks
27 stars 15 forks source link

Access webcam #19

Closed jandrewtorres closed 6 years ago

jandrewtorres commented 6 years ago

4 Added a quick webcam access notebook. Take a selfie and apply filters.

djbarnwal commented 6 years ago

Hi @jandrewtorres, this PR has got your other Pull Requests' changes as well. It would be great if you could put the most recent commits and edit the PR so it's just those changes.

Best practice is to create a new branch from master for each PR you're going to open. Then rebase as needed, depending on the activity on master.

Btw, great work with the notebooks 😄

jandrewtorres commented 6 years ago

@djbarnwal Oops, thank you. Corrected with new commit.

bcolloran commented 6 years ago

Hmm, this example isn't working for me on FF (for our featured example notebooks, it will be important to test on at least FF and Chrome). I don't think this is the problem, but it looks like you're using webkit only css styles. Are there unprefixed versions that work in all browsers? Or perhaps other ways of accomplishing this objective?

Also FWIW, I did notice this console message on Chrome: [Deprecation] URL.createObjectURL with media streams is deprecated and will be removed in M68, around July 2018. Please use HTMLMediaElement.srcObject instead. See https://www.chromestatus.com/features/5618491470118912 for more details.

Cool notebook! I'm looking forward to merging it :-)

jandrewtorres commented 6 years ago

@bcolloran Thank you. Just pushed a commit that resolves both the FF compatibility and Chrome console warning issues. Ready for review.

bcolloran commented 6 years ago

Hi @jandrewtorres thanks for updating this!

This is working better now, and seems to work the same for me on FF and Chromium, but only the selfie part (including filters) is working --

@hamilton and @djbarnwal can you all take a look? if it's only my machine that is acting funny, we can merge this.

jandrewtorres commented 6 years ago

@bcolloran This is a side effect of opening the file on your computer, with the file:// prefix. When served from https it should work. Unfortunately since we cannot import notebooks yet, it is hard to test. I just copied and pasted the code I wrote into a new notebook on https://iodide-project.github.io/master/ to test and it works fine. Reference: https://stackoverflow.com/questions/19914289/webcam-permission-request-doesnt-work-with-local-files

bcolloran commented 6 years ago

ah cool, that makes sense. thanks @jandrewtorres, merged!