              if (videoTimer != null) {
                    playVideoStop();
                }
                video.play();
                videoTimer = setInterval(sendVideo, 1000);
            }

            function playVideoStop() {
                video.pause();
                clearInterval(videoTimer);
                videoTimer = null;
            }

            function sendVideo() {
                if (video.paused || video.ended) {
                    playVideoStop();
                    return;