1

So a feature of IOS low power mode is to not play a video (on iphones) when autoplay is present i.e.

<video id="video_1" class="video" autoplay="autoplay" loop muted playsinline poster="./assets/video/poster.jpg">
                    <source src="assets/video/echo-video-optomized2.mp4" type="video/mp4">
                    your browser does not support HTML5
                </video>

I am aware that you can use an event listener to detect this issue:

let header_video = document.getElementById('video_1');

header_video.addEventListener('suspend', () => {
    console.log('Device has suspened the video from playing')
    header_video.play()
})

I thought I could be sneaky and then this is detected just ask the video to play via:

header_video.play()

I've tested that the .play() and .pause() functions work on desktop but this does not work on Iphone - I suspect that the clever devs at apple have disabled these features while low power mode is on but (and here is the questions):

1: Is that the case? have the devs removed/prevented JS from using .play() / .pause() on low power mode for IOS deveices? (also is that universal for adriod as well?)

2: Can you force the video to play?

Thanks in advance for any help and feel free to ask any related questions - Wally

Wally
  • 705
  • 1
  • 9
  • 24
  • What would be the point of disabling video auto play in low power mode if web sites could just force it to play anyway? – Paulw11 Jul 26 '21 at 11:33
  • Hey @Paulw11, So So many different responses and open to a far larger debate on whether a software provider should be allowed alter a websites UI... But thats not the point - I assume its a blanket no based on your reply? – Wally Jul 26 '21 at 12:12
  • https://stackoverflow.com/questions/43570460/html5-video-autoplay-on-iphone – Shakti Nov 06 '21 at 02:59

0 Answers0