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

Not working in Safari 11 #75

Open
jacdec opened this issue Dec 1, 2017 · 4 comments
Open

Not working in Safari 11 #75

jacdec opened this issue Dec 1, 2017 · 4 comments

Comments

@jacdec
Copy link

jacdec commented Dec 1, 2017

Actually Safari 11 supports WebRTC: https://developer.apple.com/library/content/releasenotes/General/WhatsNewInSafari/Safari_11_0/Safari_11_0.html

Unfortunately this script is currently not working... Is anybody having the same problem?
It's known, that Safari requires some special tags (webrtc/samples#929) - but I couldn't figure out the error in the js.

@Lucassifoni
Copy link

Hi, do you have some logs ? I can probably help with that !

@jacdec
Copy link
Author

jacdec commented Dec 16, 2017

I found a solution. The latest rtc-adapter was missing linked in the html. Furthermore the "playsinline"-tag has to be added to the video element. If both changes are applied it's working like a charm!

@liviuk2
Copy link

liviuk2 commented Mar 1, 2018

Hi, @jacdec could you please give me more detailed informations about the modifications that you made to get it work on safari? I have the same problem...

@Orifiael
Copy link

Orifiael commented Aug 6, 2018

What he said:
in webqr.js
change:
var vidhtml = '<video id="v" autoplay></video>';
to
var vidhtml = '<video id="v" autoplay playsinline></video>';

in index.html:
add:
<script type="text/javascript" src="https://webrtc.github.io/adapter/adapter-latest.js"></script>

For it to work on your iPhone (Safari) -

  • Settings > Safari > ENABLE "Camera & Microphone Access"
  • Settings > Safari > Advanced > ENABLE "Javascript"

P.s. When you activate the camera on the phone, it will be facing you. You can rectify that by pressing the video icon again, however it acts as a selector, it actually starts being 'pressed'. to overide you'd need to click the camera icon and then the video icon.

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

4 participants