camera function is disabled if put Survey123 form in iframe and open on desktop

772
2
Jump to solution
03-14-2021 03:56 PM
ArthurXiao
New Contributor II

Like this sample

https://national-willow-tit-survey-rspb.hub.arcgis.com/pages/submit-data

in the documentation

https://developers.arcgis.com/survey123/guide/embed-a-survey-using-an-iframe/

If put Survey123 form with camera function in iframe, then the camera function is disabled when open on desktop with browser, but it works well if open on mobile phone with browser.

If not in iframe, then camera function in Survey123 form works well for both desktop and mobile.

0 Kudos
1 Solution

Accepted Solutions
ZhifangWang
Esri Regular Contributor

Hi @ArthurXiao ,

Thanks for sharing the ArcGIS Hub page which can reproduce the issue. It looks like the iframe code used by the ArcGIS Hub page does not allow the camera privilege (but only the geolocation privilege) for the embedded survey.

 

Adding "camera 'src'" to the allow attribute of the iframe should fix this, showing in the attached screenshot.

 

Thanks,

Zhifang

View solution in original post

0 Kudos
2 Replies
ZhifangWang
Esri Regular Contributor

Hi @ArthurXiao ,

Thanks for sharing the ArcGIS Hub page which can reproduce the issue. It looks like the iframe code used by the ArcGIS Hub page does not allow the camera privilege (but only the geolocation privilege) for the embedded survey.

 

Adding "camera 'src'" to the allow attribute of the iframe should fix this, showing in the attached screenshot.

 

Thanks,

Zhifang

0 Kudos
ArthurXiao
New Contributor II

@ZhifangWang Great, problem fixed, thanks!

0 Kudos