title: Ionic app - IOS low power mode preventing videos from loading
body: <p>So I noticed a quirky bug, that I am not sure how to circumvent. When an IOS user puts their phone into low-power mode, videos stop loading on my Ionic application. </p>
  
  <p>The videos are stored on Cloudinary and are being delivered to the device correctly, but they are not displaying. So instead of a normal video, it just displays a white background. </p>
  
  <p>According to Apple <a href="https://developer.apple.com/documentation/foundation/nsprocessinfo/1617047-lowpowermodeenabled?language=objc" rel="nofollow noreferrer">docs</a>:</p>
  
  <blockquote>
    <p>In Low Power Mode, iOS conserves battery life by enacting certain energy-saving measures, such as reducing CPU and GPU performance, reducing screen brightness, and pausing discretionary and background activities.</p>
  </blockquote>
  
  <p>Which an <a href="https://www.howtogeek.com/229224/how-to-use-low-power-mode-on-an-iphone-and-what-exactly-it-does/" rel="nofollow noreferrer">article</a> I found states that: </p>
  
  <blockquote>
    <p>Background activities and <strong>networking</strong> are paused to prevent unnecessary power drain in the background.</p>
  </blockquote>
  
  <p>But I wouldn't imagine that this would affect video loading, even if they are set in normal <code>video</code> tags, would it?</p>
  
  <p>Here is the relevant code for loading the video:</p>
  
  <pre><code>&lt;video[muted]="true" playsinline loop preload="auto"&gt;
     &lt;source [src]="media.url" type="video/mp4"&gt;
  &lt;/video&gt;
  </code></pre>
  
  <p>I tried changing the preload tag to the other available attributes, but it didn't change anything. The videos still do not load.</p>
  
  <p>I checked other applications (non-Ionic), such as Facebook and Instagram, and their videos appear to load just fine within the application, so I believe it has something to do with the HTML5 video tag.</p>
  
  <p>According to this <a href="https://www.radiantmediaplayer.com/docs/latest/autoplay-support.html" rel="nofollow noreferrer">article</a>  </p>
  
  <blockquote>
    <p>According to our testing when an iOS 11+ device is in low power mode autoplay even muted is forbidden by the OS. This does not apply to iOS 10 and below. Radiant Media Player will properly handle autoplay requests when low power mode is engaged in iOS 11+ by providing a play button to initiate playback (a user interaction will be needed in such case as autoplay would have failed).</p>
  </blockquote>