MozillaReality / immersive-custom-elements

INACTIVE - Immersive Custom Elements
https://mixedreality.mozilla.org/immersive-custom-elements/examples/index.html
Mozilla Public License 2.0
134 stars 8 forks source link

<img-360> can't enter fullscreen mode on iPhone/iPod touch #67

Closed takahirox closed 5 years ago

takahirox commented 5 years ago

From #60

On iOS (my iPod touch) + Safari, \<img-360> can't enter fullscreen mode. I haven't checked any console errors yet.

takahirox commented 5 years ago

I don't have platform where I can debug on iOS. I need help.

takahirox commented 5 years ago

I can reproduce this problem even on iOS + Chrome. Maybe (mobile?) iOS specific issue regardless of browsers.

takahirox commented 5 years ago

I can reproduce this problem on iPad + Safari.

psimyn commented 5 years ago

I tested in BrowserStack (iPad with Safari), got this error when clicking:

TypeError: document.exitFullscreen is not a function. (In 'document.exitFullscreen()', 'document.exitFullscreen' is undefined)(anonymous function) @ immersive-custom-elements.js:49600

here's the click handler code that is breaking:

if (document.fullscreenElement === null) {
  canvas.requestFullscreen();
} else {
  document.exitFullscreen();
}

I think all the fullscreen things need webkit prefix or a polyfill

takahirox commented 5 years ago

Thanks for the report and solution! I'll try.

takahirox commented 5 years ago

With #75, I think it works on iPad + Safari. (I don't have iPad at the office so haven't tried yet tho.)

But it still doesn't work on my iPod touch + Safari/Chrome. According to this iPhone doesn't seem to support it.

So we may need to wait for them start to support. And I'll remove "Fullscreen" button for iPhone in another PR.

@joshmarinacci Let me remove this issue from v0.2.0 milestone. I don't think we can fix from our side.

joshmarinacci commented 5 years ago

Yes, I recall only iPad fullscreen works, not iPhone; which means it is clearly an intentional decision on Apple's part. I'd call this one fixed if #75 is merged

takahirox commented 5 years ago

75 is merged because supporting webkit and other prefix looks good anyways. I'm going to test at home on iPad and I close this issue if it works fine. Then maybe I add note at readme that fullscreen isn't supported on iPhone.

takahirox commented 5 years ago

Screenshot of iPad + Safari. It enters fullscreen mode but image (dom element) isn't resized.

IMG_0249

iPad + Chrome doesn't seem to support Fullscreen API.

The results are the same as the screenfull.js demo so probably these behaviors are the intentional. So closing this issue.

fernandojsg commented 5 years ago

Out of curiosity, have you tried to see if they have the same issue?

takahirox commented 5 years ago

Who are "they" in this case? screenfull.js?

fernandojsg commented 5 years ago

Ops I used <model-viewer> without escaping the tags and it was just hidden :D. I mean if modelviewer has the same issues on ipad/iphone with the fullscreen or they have another solution

takahirox commented 5 years ago

OK, let me try at home tonight. I don't have iPad at the office.