Chrome data saver and video.play()
Chrome with data saver enabled will play the video on 1000 button click but not on 1001 button clik
by kouty79
HTML
<p>
Enable chrome data saver and test the buttons
</p>
<video width="320" height="240" muted controls id="vid">
<source src="https://www.w3schools.com/tags/movie.mp4" type="video/mp4">
<source src="https://www.w3schools.com/tags/movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
<br>
<button id="m1000"> 1000 ms</button>
<button id="m1001"> 1001 ms</button>
JavaScript
const video = document.querySelector('#vid');
document.querySelector('#m1000').onclick = function() {
setTimeout(()=>video.play(), 1000);// will play
}
document.querySelector('#m1001').onclick = function() {
setTimeout(()=>video.play(), 1001);// won't play
}
setTimeout(()=>video.play(), 500); // won't play