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