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

getUserMedia example on iOS #136

Open
varvello opened this issue Aug 1, 2019 · 4 comments
Open

getUserMedia example on iOS #136

varvello opened this issue Aug 1, 2019 · 4 comments

Comments

@varvello
Copy link

varvello commented Aug 1, 2019

Hi Sam,

On iOS, even is I select the rear camera, the front camera is always chosen.

TIA
Cheers
Davide

@samdutton
Copy link
Owner

Thanks for the heads-up.

This commit fixes this.

There were two problems:
• I'd forgotten to add playsinline to <video> for this demo.
• AFAICT Safari only gets default devices until after gUM is called.

(Demo is at simpl.info/sources.)

Let me know if you're still experiencing glitches.

@varvello
Copy link
Author

varvello commented Aug 3, 2019

Unfortunately, Sam, the behaviour is the same. Selecting camera 1 or camera 2 always shows the front camera, sorry.

@samdutton
Copy link
Owner

samdutton commented Aug 5, 2019

Update 1: I've noticed that on iOS the camera initially shown as selected may not be the same as the camera that's actually in use. This means you may need to need to select the camera twice in order to see a change. I'll fix this.

Update 2: I've done some additional commits attempting to fix this, but it still seems to require multiple selection on iOS. I'll keep trying...

Sorry to hear it's not working.

What version of iOS are you using?

I've tried iOS 12.3.1 and 12.4 on an iPhone 7 and the demo is working as expected.

(Sounds obvious, I know, but make sure you've got the updated version. It should say mediaDevices.enumerateDevices() in the title and Front/Back Camera in the selector.)

@varvello
Copy link
Author

varvello commented Aug 9, 2019

iPhone xr, iOs 12.3.1

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

2 participants