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 to Use Temasys/AdapterJS for getUserMedia (brings iOS + Safari compatibility) #172

Merged
merged 2 commits into from
Sep 17, 2020

Conversation

chukohsin
Copy link
Contributor

@chukohsin chukohsin commented Aug 29, 2020

Description

Since addyosmani/getUserMedia.js is lack of maintenance. This replaces it with Temasys/AdapterJS, which provides polyfills and cross-browser helpers for WebRTC. It wraps around the native APIs in Chrome, Opera and Firefox and provides support for WebRTC in Internet Explorer and Safari on Mac and Windows through the available Temasys Browser Plugins.

fixes #87 (link added by @jywarren)

Files Changed

  • Add examples/capture/getUserMedia.js: this helper function includes the required initialization for AdapterJS and call getUserMedia with default constraints.
  • examples/capture/capture.js: remove old options customized for addyosmani/getUserMedia.js. Move success callback to getUserMedia.js helper function.
  • examples/capture/getRow.js: Remove conditional statements customized for addyosmani/getUserMedia.js flash fallback.
  • package.json: remove "getusermedia-js": "~1.0.0"
  • examples/capture/index.html: add AdapterJS

Notes

This has been tested on Chrome, Firefox and Safari.


Make sure these boxes are checked before your pull request is ready to be reviewed and merged. Thanks!

  • tests pass -- see README.md for how to run them
  • code is in uniquely-named feature branch, and has been rebased on top of latest master (especially if you've been asked to make additional changes)
  • pull request are descriptively named
  • if possible, multiple commits squashed if they're smaller changes
  • reviewed/confirmed/tested by another contributor or maintainer

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/wiki/contributing-to-public-lab-software

Please alert developers on plots-dev@googlegroups.com when your request is ready or if you need assistance.

Thanks!

Since https://github.com/addyosmani/getUserMedia.js/ is not being being maintenanced continuously, this replaces it to use temasys adapterjs.
This updates getUserMedia to use adapterjs.
- Remove old logics for addyosmani/getUserMedia.js
- Add new implementation of AdapterJS (please refer to https://github.com/Temasys/AdapterJS for detailed doc)
@welcome
Copy link

welcome bot commented Aug 29, 2020

Thanks for opening this pull request! Dangerbot will test out your code and reply in a bit with some pointers and requests.
There may be some errors, but don't worry! We're here to help! 👍🎉😄

@gitpod-io
Copy link

gitpod-io bot commented Aug 29, 2020

@jywarren jywarren changed the title Update to Use Temasys/AdapterJS for getUserMedia Update to Use Temasys/AdapterJS for getUserMedia (brings iOS + Safari compatibility) Sep 17, 2020
Copy link
Member

@jywarren jywarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fantastic. Tested on iOS Safari with version info:

phone()
iPhone
tablet()
-
mobile()
iPhone
os()
iOS
userAgent()
Safari
mobileGrade()
A
smaller side
375
_version
1.4.4 2019-09-21
is("iPhone")
true
is("iOS")
true
is("Safari")
true
is("WebKit")
true
versionStr("Mobile")
"15E148"
version("Mobile")
15.148
versionStr("Version")
"13.1.2"
version("Version")
13.12
versionStr("iPhone")
"13_7"
version("iPhone")
13.7
versionStr("Opera")
"13.1.2"
version("Opera")
13.12
versionStr("Opera Mobi")
"13.1.2"
version("Opera Mobi")
13.12
versionStr("Safari")
"13.1.2"
version("Safari")
13.12
versionStr("Webkit")
"605.1.15"
version("Webkit")
605.115
versionStr("iOS")
"13_7"
version("iOS")
13.7

I do note we can't flip the camera, but once we merge this perhaps we can address that in a follow-up PR or in #173. Thank you so much!

@jywarren jywarren merged commit 4f6c7c1 into publiclab:main Sep 17, 2020
@welcome
Copy link

welcome bot commented Sep 17, 2020

Congrats on merging your first pull request! 🙌🎉⚡️
Your code will likely be published to https://spectralworkbench.org in the next few days.
In the meantime, can you tell us your Twitter handle so we can thank you properly?
Now that you've completed this, you can help someone else take their first step!
See: Public Lab's coding community!

@Forchapeatl
Copy link

Forchapeatl commented Aug 1, 2022

Hello @jywarren I have gone through all the live demo episodes of https://plugin.temasys.com.sg/demo/ on Safari. It seems only the first frame gets captured. Please could you test it at your end.
@chukohsin please can you help me with temasys resources/documents?

@jywarren
Copy link
Member

jywarren commented Aug 1, 2022 via email

@Forchapeatl
Copy link

Forchapeatl commented Aug 1, 2022

@jywarren , sorry for the late response.

Temasys works fine on both Fire Fox and Chrome. I believe Safari no longer supports Temasys.
image
from https://support.temasys.com.sg/support/solutions/articles/12000049210-end-of-support-for-temasys-webrtc-plugin-on-safari-12-and-onwards .

@Forchapeatl
Copy link

Forchapeatl commented Aug 1, 2022

I have contacted the technical team in regards to this single frame limitation

@jywarren
Copy link
Member

jywarren commented Aug 1, 2022 via email

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

Successfully merging this pull request may close these issues.

Update getUserMedia WebRTC library for broader browser compatibility (+ iOS)
3 participants