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

Update getUserMedia WebRTC library for broader browser compatibility (+ iOS) #87

Closed
2 tasks done
jywarren opened this issue Mar 28, 2019 · 13 comments · Fixed by #172
Closed
2 tasks done

Update getUserMedia WebRTC library for broader browser compatibility (+ iOS) #87

jywarren opened this issue Mar 28, 2019 · 13 comments · Fixed by #172

Comments

@jywarren
Copy link
Member

jywarren commented Mar 28, 2019

http://publiclab.org/spectral-workbench#Browsers lists:

Spectral Workbench should work on Chrome (in Windows/Mac/Linux/Android, but not iOS), Firefox (Windows/Mac/Linux/Android), or Opera (Android). It may work on other browsers and we are working on expanding coverage; read more on this page:

Linking here; we should be able to support:

  • Safari desktop
  • iOS (soon, as we hear getUserMedia is now supported on iOS???)

Let's discuss/plan/collect information here!

This would also be possible to port back to https://github.com/publiclab/spectral-workbench/ once implemented here.

@jywarren
Copy link
Member Author

@sidntrivedi012
Copy link
Member

sidntrivedi012 commented Mar 29, 2019

@jywarren I found out that the camera capture is not working on firefox quantum as well as the firefox nightly browser. Implementing this cross-browser compatibility is very important since a lot of people don't use Chrome/Chromium since these browsers are quite heavy to work on their machine.

Please guide me as to how to implement this. Would like to work on it.

@sidntrivedi012
Copy link
Member

Peek 2019-03-29 20-33

@sidntrivedi012
Copy link
Member

sidntrivedi012 commented Mar 29, 2019

The camera was not starting even after giving it the permission. An warning was popping up in the console - navigator.mozGetUserMedia has been replaced by navigator.mediaDevices.getUserMedia.

But I don't think the camera is not working because of this warning. There's some other error.

@jywarren
Copy link
Member Author

Hi! I think we need to identify a replacement for the getUserMedia shim we're using here:

<script src="../../node_modules/getusermedia-js/dist/getUserMedia.min.js"></script>

"getusermedia-js": "~1.0.0",

There are a number of other shim libraries out there. Let's find one that's really well supported, and migrate to it. Some even support iOS, i believe!

https://duckduckgo.com/?q=github+getusermedia&atb=v121-6&ia=web

This one is worth testing out: https://webrtc.github.io/samples/src/content/getusermedia/gum/

https://github.com/webrtc/samples/tree/gh-pages/src/content/getusermedia/gum

See it working in iOS here! processing/p5.js#2146

@jywarren jywarren changed the title Update getUserMedia WebRTC library for broader browser compatibility Update getUserMedia WebRTC library for broader browser compatibility (+ iOS) Apr 16, 2019
@jywarren jywarren pinned this issue Apr 16, 2019
@jywarren
Copy link
Member Author

@sidntrivedi012 I was wondering if you'd consider prioritizing the part of your project which updates the getUserMedia component? Because a recent change in Chrome for Android means we can no longer switch from the front camera to the back camera on a smartphone. So, people using these papercraft spectrometers now have a much harder time: https://publiclab.org/papercraft-spectrometer

@jywarren
Copy link
Member Author

Either by trying to get an early version of your project using this fix to production in "beta" mode sooner, or, potentially trying to apply the fix to the existing codebase in parallel to developing the stand-alone library. I'm not sure what would be better?

@jywarren
Copy link
Member Author

@sidntrivedi012 would you try this code to get this working on iOS?

https://github.com/processing/p5.js/pull/2147/files

@jywarren
Copy link
Member Author

Do you have a version of Safari on iOS or Mac os to test?

@jywarren
Copy link
Member Author

Here's a great article on webrtc adapters and what they're for!

https://bloggeek.me/webrtc-adapter-js/amp/

@sidntrivedi012
Copy link
Member

@jywarren I would like to work on it. Have also made a PR at #125. Can we start work on it again?

@jywarren
Copy link
Member Author

jywarren commented Jan 6, 2020 via email

@jywarren
Copy link
Member Author

This was solved by @chukohsin + team in #172 by using https://github.com/Temasys/AdapterJS !

@jywarren jywarren unpinned this issue Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants