kalwalt / kalwalt-interactivity-AR

Some various experiments with Ar.js and Three.js
https://kalwalt.github.io/kalwalt-interactivity-AR/
GNU Lesser General Public License v3.0
78 stars 11 forks source link

Camera not working with IOS and Safari browser #9

Open huynhthanhnhan opened 4 years ago

huynhthanhnhan commented 4 years ago

My English is not good, hope everyone sympathize! I am trying to run this demo with IOS version 13.3 and the Safari browser. https://kalwalt.github.io/kalwalt-interactivity-AR/nft/nft_cesium.html The situation is that after 'allow' the camera, the screen is captured and the video cannot be played. If I switch back to the main screen or another tab and come back, the video will play normally. With Android and Windows devices, everything is fine. I don't know if this is an error due to camera permissions on IOS or some other problem. Looking forward to the help, thank you everyone.

kalwalt commented 4 years ago

Hi @huynhthanhnhan thank you for reporting this! Unfortunately i haven't an iOS device to test but definetely seems an issue with iOS. i will re-post this issue on the kalwalt/jsartoolkit5 for a better support. Let's continue the discussion there.

kalwalt commented 4 years ago

Reported back here because i think it's specific to examples posted here.

kalwalt commented 4 years ago

What is the result with this https://kalwalt.github.io/kalwalt-interactivity-AR/nft/nft_pinball_image.html instead?

huynhthanhnhan commented 4 years ago

Hi @kalwalt thanks for your respond. I have just checked with the link above but the result is still the same. There are a few details we can consider that when allowing the camera, the first picture was taken proving that the camera was turned on but after the video did not continue, I tried debugging the process and rendering loops continued running. I think it is possible that our video has been blocked by some process or is not in focus because when opening another application or returning to the home screen and returning to the demo, video and everything works normally again. Do you think the problem is related to ThreeJS objects like Texture or scene, camera, etc.?

huynhthanhnhan commented 4 years ago

Hi @kalwalt , I tried more on two iOS 13 devices and failed but with one other iOS 12 device everything was fine. I have not tried it on IOS 11 but it seems this is really a problem of IOS 13. Thank you very much for your help ^^!

kalwalt commented 4 years ago

@huynhthanhnhan As i remember we had a similar issue in Ar.js, i think the problem was that getUserMedia do not choose the right camera (or a camera that not exist in the device), but i can't be sure because i can not test sorry! I would also post or link this issue also on the artoolkitx/jsartoolkit5 issue tracker, because other users may encounter this issue.