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

Is the presentation mode button fixed for ipad and iphone ? #1553

Closed
Mithlesh29 opened this issue Oct 10, 2022 · 11 comments
Closed

Is the presentation mode button fixed for ipad and iphone ? #1553

Mithlesh29 opened this issue Oct 10, 2022 · 11 comments

Comments

@Mithlesh29
Copy link

I am using ngx-extended-pdf viewer version 9.0.5 . And the presentation mode doesnt seem to work in my ipad and iphone .

MicrosoftTeams-image

@stephanrauh
Copy link
Owner

That's true. And I can't do anything about it, because it's a limitation of iOS. As far as I remember, I've hidden the presentation mode button on iOS devices. Has it reappeared?

@Mithlesh29
Copy link
Author

Just wanted to know the reason why it’s was not showing in IOS devices . And the presentation button is hidden . I just made changes to check if it works.
Thanks for the reply .

@Mithlesh29
Copy link
Author

Is there any other alternative to view the pdf in presentation mode in iPad and iPhone ?

@Mithlesh29 Mithlesh29 reopened this Oct 11, 2022
@stephanrauh
Copy link
Owner

As far as I know, there's no alternative. If you find one, please tell me. I'm not happy with the presentation mode missing.

@timvandermeij Tim, maybe you've got some new insight I may have missed. As far as I remember, the presentation mode doesn't work on iOS, and there's no way to fix it. Is this correct?

@Mithlesh29
Copy link
Author

Thankyou for the clarification.

@timvandermeij
Copy link

timvandermeij commented Oct 15, 2022

PDF.js only uses the native fullscreen API in the browser nowadays. To check if full screen is supported, we check document.fullscreenEnabled. Unfortunately, Safari is lagging behind all other browsers when it comes to full screen support (and in general really) and only supports a limited vendor-prefixed version of this API; please see the table at https://developer.mozilla.org/en-US/docs/Web/API/Document/fullscreenEnabled#browser_compatibility and also click the cell in that table to see which limitations exist.

In mozilla/pdf.js@9d773c1 the vendor-prefixed version got removed because Safari was deemed too far behind to warrant further support.

You could consider putting that check back in this component, but even then it's not guaranteed that full screen works as expected because of other Safari-specific limitations such as this vendor-prefixed version not working on iPhone at all, so I would not recommend this. It would be better to file/bump an issue for the Safari developers to bring their full screen API support in line with all other browsers so we don't need browser-specific hacks anymore.

Hopefully that sheds a bit of light on the matter :-)

@stephanrauh
Copy link
Owner

Thanks a lot. It sheds a lot of light on the matter!

@Mithlesh29 Filing a issue at the Safari bugtracker sounds like a good idea. Can I talk you into doing that?

@Mithlesh29
Copy link
Author

Thanks a lot for the support @timvandermeij .
@stephanrauh yes please . it would be helpful if you can guide me through the steps.

@Mithlesh29
Copy link
Author

@stephanrauh okay now I am totally confused .
I am able to view presentation mode button on my iPad now . Even the presentation mode works fine .
The only difference is , right now I am connected to the server , is this happening due to cross origin error .
Safari version is 14.8.1 and its a 9.7 inch iPad
MicrosoftTeams-image

@stephanrauh
Copy link
Owner

Well, basically Tim only said that the Mozilla team have removed the Safari-specific code. If I've got you right, you've overwritten the code hiding the presentation mode button, so the user can click it. If they do so, the standard implementation kicks in. If it works on Safari, that probably means Safari's begun to support the currrent standards.

Of course, that's just a guess. I may be wrong. Or maybe Safari supports full-screen mode in a lackluster way. I suppose there's a reason Mozilla's dropped Safari support.

@Mithlesh29
Copy link
Author

@stephanrauh This one's a different iPad . So I haven't changed any code in the Ngx-extended-pdf viewer package . I just opened my site to check if the presentation mode works . It works fine
As I said the only difference here is the wifi connection .

screensize- 12.9inch and 9.7 inch , iPad Pro
iOS version - 15.7 and 14.8.1
ngx-extended-pdf version - 9.0.5

It seems to work fine in both the iPad
I am sorry for too many questions but I am trying to find the reason behind this error.

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

3 participants