Sharing blocks custom webcam component due to featurePolicy

Hi everybody,

My app is deployed on Streamlit sharing:

Code (still working on it): GitHub - patryk-oleniuk/face-emotionz-webapp

If you select “Image source” “Webcam”, its gonna use this component to get a picture from a webcam:

That webcam component works perfectly on my localhost, but on streamlit sharing I get an error message
Webcam error: Error: 'camera' is not in our featurePolicy


Streamlit sharing:

Edit: I read more online and I think it’s aboit the iframe’s HTTP featurePolicy header:

Thanks for any tips, cheers!

Hey @patryk-oleniuk, welcome to Streamlit, and thanks for the heads up!

Yeah, this is an oversight on our part. Streamlit sharing mounts your Streamlit app in an iframe, and that iframe currently doesn’t have the same featurePolicy that Streamlit Component iframes have. We’ll have a fix for this soon!


Thanks @tim, I see!

When is the fix expected, few days, weeks or months? Just trying to understand, thanks in advance :slight_smile:

My understanding is it should be on the order of days - hopefully this week or next. (It should go out in an upcoming Streamlit sharing release, unless something unusual happens!)