You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello again, I found another issue.
If fullscreen API is supported in iOS devices, like iPad OS 13+ safari, requestSession will be rejected with the error "Unable to present";
Here's my explanation:
in iPad OS 13+, navigator.platform has following values.
Desktop mode: MacIntel
Mobile mode: iPad
which makes isIOS() returns true only for the mobile mode.
The problem is, polyfill creates a new canvas element when requestSession is called, like the following code, and uses it as a layer source for VRDisplay's requestPresent method.
VRDisplay's wrapForFullscreen is the only place where it wraps the canvas element with wrapper element and appends it to the body, but it won't if it's iOS environment.
So, it will call requestFullscreen for canvas before it is added to the document, so a fullscreen error will be triggered and requestSession will be rejected also.
One suggestion is least guaranteeing that the canvas is in the document when it's created.
I know there's no meaning in supporting iPad right now, but I guess when Fullscreen API lands on iOS someday it will be meaningful to do it.
Hello again, I found another issue.
If fullscreen API is supported in iOS devices, like iPad OS 13+ safari,
requestSession
will be rejected with the error "Unable to present";Here's my explanation:
in iPad OS 13+,
navigator.platform
has following values.MacIntel
iPad
which makes
isIOS()
returns true only for the mobile mode.The problem is, polyfill creates a new canvas element when
requestSession
is called, like the following code, and uses it as a layer source for VRDisplay'srequestPresent
method.VRDisplay's
wrapForFullscreen
is the only place where it wraps the canvas element with wrapper element and appends it to the body, but it won't if it's iOS environment.So, it will call
requestFullscreen
for canvas before it is added to the document, so a fullscreen error will be triggered andrequestSession
will be rejected also.One suggestion is least guaranteeing that the canvas is in the document when it's created.
I know there's no meaning in supporting iPad right now, but I guess when Fullscreen API lands on iOS someday it will be meaningful to do it.
Sorry for not preparing any demos.
I think this issue can be reproduced in https://naver.github.io/egjs-view360/panoviewer.html, until I release another version of it.
Thanks!
The text was updated successfully, but these errors were encountered: