title: IOS camera returns black screen after leaving pwa
body: <p>I'm using html file input to open camera and take photos for my PWA.</p>
  
  <pre><code>&lt;input type="file" accept="image/*" capture="camera" name="photo" id="photo-input-js" data-project-id="&lt;?php echo $projectId ?&gt;"&gt;
  
  // this element triggers the input 
  &lt;li class="menu-item &lt;?php echo $current_page == 'camera' ? 'is-active' : '' ?&gt;" id="camera-tab"&gt;
     &lt;a href="&lt;?php echo site_url("photos/openCamera/". $projectId) ?&gt;" id="open-camera-js"&gt;
              &lt;div class="icon icon-camera"&gt;&lt;/div&gt;
      &lt;span class="d-none d-md-block "&gt;Camera&lt;/span&gt;
     &lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>// open camera
  $(document).on('click', '#open-camera-js', function(e) {
    e.preventDefault();
  
    $(".menu-item").removeClass('is-active');
    $("#camera-tab").addClass('is-active');
  
    // check support for geolocation/ask for permissions
    if (!navigator.geolocation) {
        throw new Error('Unsupproted device');
     }
  
    // open the file input
    $("#photo-input-js").click();
  });
  
  // save image
  $(document).on('change', '#photo-input-js', function(e) {
       e.preventDefault();
       let photo = $(this).prop('files')[0] ? $(this).prop('files')[0] : false;
       if (photo) {
          // handle captured photo
       }
  </code></pre>
  
  <p>After I download the pwa to my homescreen, camera works perfectly until I leave the app and come back without swiping out the app from open apps.</p>
  
  <p>If press the home button and leave the app, and then come back, I get a black screen instead of camera footage like this:</p>
  
  <p><a href="https://i.stack.imgur.com/kJMrX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kJMrX.png" alt="Error"></a></p>
  
  <p>After that I have to leave the app and swipe out my pwa from open apps and open the app again to make camera work again normally.</p>
  
  <p>Camera works fine on android version of my pwa</p>