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

Fullscreen only working on some iOS devices #1314

Closed
jywarren opened this issue May 22, 2024 · 3 comments
Closed

Fullscreen only working on some iOS devices #1314

jywarren opened this issue May 22, 2024 · 3 comments
Labels

Comments

@jywarren
Copy link

Describe the bug

I ran a workshop where lots of people tried an instance of PSV and for some proportion of iOS devices, the stereo icon did not do anything. I connected an iPhone to a Mac to try to get a log and the following error appeared (safari):

TypeError: undefined is not an object (evaluating '(elt.requestFullscreen || elt.webkitRequestFullscreen).call')

The full trace was:

[Error] TypeError: undefined is not an object (evaluating '(elt.requestFullscreen || elt.webkitRequestFullscreen).call')
	requestFullscreen (index.module.js:320)
	enterFullscreen (index.module.js:6454)
	start (index.module.js:234)
	toggle (index.module.js:283)
	onClick (index.module.js:70)
	(anonymous function) (index.module.js:2353)

Although a similar issue was addressed in #850, I think this is a distinct one relating to this line:

8330ff7#diff-7a0921ae695d2eb16ca10b86dfb9262fe758b902ebfaac806dee8f6df8de9ae3R139

It affected Chrome on iOS too, but that's just Safari in a Chrome skin, so probably the same issue.

I'm going to do some more checking on 3 iOS devices to see if I can see a version difference between working/not working and will update here. Thank you.

Online demo URL

https://jywarren.github.io/seeing-lost-enclaves/portals/viewer.html?url=spheres/providence.jpg

Photo Sphere Viewer version

5.7.4

Plugins loaded

Gyro, stereo

OS & browser

iOS Safari/Chrome

Additional context

No response

@jywarren jywarren added the bug label May 22, 2024
@jywarren
Copy link
Author

Just noting also seems similar to #209 (comment)

Agree, Apple is so frustrating on these issues... :-(

@jywarren
Copy link
Author

jywarren commented May 22, 2024

iPadOS v 17.4.1 (Chrome + Safari) works
iOS (iPhone) 16.77 (Chrome + Safari) does NOT work
iOS (iPhone) 16.2 (Safari) seems to have some other error preventing the whole page from loading, will open a separate issue... #1315 but will come back here to update for this device if I work around it

Update: iOS (iPhone) 16.2 (Chrome + Safari), once I get past #1315, does NOT work - same undefined is not an object error

@jywarren
Copy link
Author

This error doesn't seem to match the code I'm actually seeing in latest main branch:

/**
* Enters fullscreen mode
*/
export function requestFullscreen(elt: HTMLElement, isIphone = false) {
if (isIphone) {
fullscreenElement = elt;
elt.classList.add('psv-fullscreen-emulation');
document.dispatchEvent(new Event('fullscreenchange'));
} else {
elt.requestFullscreen();
}
}

looking further...

Waaaah hooray! @mistic100 already fixed this just days ago: ea0260a

Will test in https://github.com/mistic100/Photo-Sphere-Viewer/releases/tag/5.7.4

In any case, many thanks and wow you fixed a bug 5 days before it was reported... amazing!

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

No branches or pull requests

1 participant