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

Open
jywarren opened this issue Mar 28, 2019 · 10 comments

Comments

@jywarren
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

commented Mar 28, 2019

@sidntrivedi012

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

commented Mar 29, 2019

Peek 2019-03-29 20-33

@sidntrivedi012

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor Author

commented Mar 29, 2019

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

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2019

@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

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2019

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

This comment has been minimized.

Copy link
Contributor Author

commented Jul 14, 2019

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

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

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Jul 14, 2019

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

@jywarren

This comment has been minimized.

Copy link
Contributor Author

commented Jul 14, 2019

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.