Bug 235079

Summary: Issue with the screenshot/photo taking during webxr activity. Background turns black.
Product: WebKit Reporter: qennng <qennng>
Component: WebXRAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: adachan, ap, dino, kkinnunen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: iPhone / iPad   
OS: iOS 15   
Attachments:
Description Flags
Black background when taking a photo in ar mode none

Description qennng@gmail.com 2022-01-11 12:32:48 PST
Created attachment 448868 [details]
Black background when taking a photo in ar mode

Hi, so the issue is when I take a photo on my Note10(Android 11), the 3D astronaut appears with my background in AR, however when take do the same on my iPad(IOS 15.2), only the 3D astronaut shows up and my background is black.

Live Demo
https://nvqenn.com/write123/

https://user-images.githubusercontent.com/21268945/148839814-116f0ac3-ae1c-4e70-a6ef-f841b1bdf87b.JPG
^The image taken from the iPad looks like this(see above)

https://user-images.githubusercontent.com/21268945/148839763-9886da11-87bc-4552-9920-1e861245bfee.jpg
^The image taken from the Samsung looks like this(see above)
Comment 1 Sam Sneddon [:gsnedders] 2022-01-12 08:43:54 PST
*** Bug 235080 has been marked as a duplicate of this bug. ***
Comment 2 Alexey Proskuryakov 2022-01-12 09:31:30 PST
I'm surprised to hear that iOS supports WebXR, is this actually what is in use here?
Comment 3 Dean Jackson 2022-01-13 09:04:41 PST
Yeah, this is a bit confusing. We don't support WebXR at the moment, especially on iOS.
Comment 4 Radar WebKit Bug Importer 2022-01-18 12:33:18 PST
<rdar://problem/87729372>
Comment 5 Kimmo Kinnunen 2022-01-20 23:01:15 PST
On iOS this is using the platform native built in model viewer. The black background would indicate that the model viewer is running out of memory or that somehow user has declined the camera (I don't know if this is possible).
qennng@gmail.com: could you go to Settings -> General of your iPad and describe what it says for Model name and model number?

I cannot immediately repro on iPad Pro 2015
Comment 6 Kimmo Kinnunen 2022-01-20 23:02:30 PST
In fact, I can repro it.
So the live model works ok, but taking a screenshot produces a black background.
Comment 7 Dean Jackson 2022-01-24 14:05:29 PST
Oh, now I see. This is the built-in AR viewer. It does appear to be a bug that it is not saving the camera feed when taking a screenshot. I've forwarded it to the right component.