Web app in standalone, camera is black when app is coming back from background?

Im using the camera to take a picture in my web app and it works fine when I start the app the first time, but if I close the app and then return from being in the background then the camera screen is black and I can´t take a picture!?

Im using this to open the camera.

<input type="file" id="files2" name="files[]" multiple accept="image/*" capture="camera"/>

This is working all the time if I open the app in Safari, but not when it is coming back from the background in standalone mode.

I have tried to reload the page when I come back from the background, but no luck.

I think this was working in the earlier iOS. Any input really appreciated!

Why you not use cordova-plugin-camera?


Because its a web app. Not a cordova app.

I need to remove the cache for the camera to work when coming back from the background.

I have tested with



> <meta http-equiv="Cache-control" content="no-cache">
> <meta http-equiv="Expires" content="-1">

But it is not deleting the cache, or at least not the right cache.

And the only way I can delete the cache to make the camera work after being in the background is if I dubble tap the home button and then swipe up on the app to remove it from the cache.
I don’t know what typ of cache it is emptying when you swipe up and remove it, but that´s the cache I need to be able to remove.

I tested yesterday with an iPhone 8 plus with iOS 12.4.1 and it works as it should there, the camera is working even if the app has been in the background. And the camera not working after being in the background, is why I need to remove the cache.
So this is a iOS 13.3 problem, since it worked before.