Pls, be aware that problem only exist on ios devices and with webm format. Don't say that it works when you open example on sandbox. To test it , open it on real ios devices (sandbox example , see button below).
<video
id="video-which-do-not-want-to-work"
autoplay
loop
muted
playsinline
width="400"
height="300"
src="https://dl8.webmfiles.org/elephants-dream.webm"
></video>
I've spend 2 days on making it works. But nothing help. What I've tried.
autoplayplaysinline and mutedsource inside of video tag with webm type const button = document.createElement('button')
button.addEventListener('click', () => {
document.getElementById('video-which-do-not-want-to-work').play()
})
button.click()
Also tried to add real button in html and attach onclick event function , which exectute element.play()
Checked is Low power mode swithced of on my phone
Prayed God
IOS version of device: 15.5
Could anyone just attach working example , if it is possible ?
Code example: