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

Sample doesn't work for iphone 7 #9

Closed
mebjas opened this issue Feb 28, 2020 · 5 comments
Closed

Sample doesn't work for iphone 7 #9

mebjas opened this issue Feb 28, 2020 · 5 comments

Comments

@mebjas
Copy link
Owner

mebjas commented Feb 28, 2020

Sample doesn't seem to be working for iphone 7 - verified on chrome and safari

@mebjas mebjas self-assigned this Feb 28, 2020
@mebjas mebjas added this to the v1.0.1 milestone Apr 4, 2020
@mebjas
Copy link
Owner Author

mebjas commented Apr 11, 2020

While this may not work on chrome due to limitation of WebKit on IOS it's not working in Iphone Safari as well with following error:

NotAllowedError: The request is not allowed by the user agent or the platform in the current context, 
possibly because the user denied permission.

So in IPhone + Safari it's able to request the camera permission, get list of cameras, and start scanning but when we do video.play() it throws the above exception.

Changing the scope of this bug to fix this issue alone. The code not working for other browsers is tracked in #14

@mebjas
Copy link
Owner Author

mebjas commented Apr 11, 2020

More details on policies around video in webkit for ios - https://webkit.org/blog/6784/new-video-policies-for-ios/

@mebjas
Copy link
Owner Author

mebjas commented Apr 11, 2020

@aamirbilvani Track this bug - I'll try to find a workaround for this and make it working for ios Safari.

@mebjas
Copy link
Owner Author

mebjas commented Apr 11, 2020

Fixed with 4c28708

@mebjas
Copy link
Owner Author

mebjas commented Apr 11, 2020

As per the webkit article setting following properties of video to true

video.muted = true;
video.playsinline = true;

allow us to call video.play() without issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant