Turiu du ir žalios ir smėlio spalvos! Super!

Meniu
var checkVideoOnce = true; var video = $('#mainVideo')[0]; $(document).ready(function() { $(document).on('touchstart click', function(event) { console.log('tc'); if (checkVideoOnce) { console.log ('once') if (!isHomeVideoPlaying()) { checkVideoOnce = false; //video.play(); } } }); }); function isHomeVideoPlaying() { return !!(video.currentTime > 0 && !video.paused && !video.ended && video.readyState > 2); }