Your IP : 172.71.120.3


Current Path : /var/www/element/data/www/pavloman.ru/
Upload File :
Current File : /var/www/element/data/www/pavloman.ru/index1.html

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Паша, с Днём рождения!</title>
<style>
.fullscreen-bg {
    height: 100%;
}
 
.fullscreen-bg__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.overlay {
    background: rgba(0,0,0,0.6);
    position: absolute;
    top:0;
    left:0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.overlay h1 {
    text-align:center;
    color:#fff;
    font-size: 70px;
    margin-top:17%;
}

@media (max-width: 767px) {
    .fullscreen-bg {
        background: url('pavel.jpg') center center / cover no-repeat;
    }
    .fullscreen-bg__video {
        display: none;
    }
}

</style>
</head>
<body>

<script>
// Обертываем код в функцию для защиты пространства имен
(function() {
// Find the DOM objects
var  video = document.getElementById("video1"),
  playBtn = document.getElementById("video1-play"),
  muteBtn = document.getElementById("video1-mute"),
  current = document.getElementById("video1-current"),
duration = document.getElementById("video1-duration");

// Переключаем состояние "старт/пауза"
playBtn.addEventListener("click", function() {
  if (video.paused || video.ended) {
    video.play();
    playBtn.value = "Pause";
  } else {
    video.pause();
    playBtn.value = "Play";
  }
}, false);

// Переключаем состояние "звук включен/выключен"
muteBtn.addEventListener("click", function() {
  if (video.muted) {
    video.muted = false;
    muteBtn.value = "Mute";
  } else {
    video.muted = true;
    muteBtn.value = "Unmute";
  }
}, false);

// Показываем длительность, когда это становится возможным
video.addEventListener("loadedmetadata", function() {
  duration.innerHTML = formatTime(video.duration);
}, false);

// Обновляем текущее время
video.addEventListener("timeupdate", function() {
  current.innerHTML = formatTime(video.currentTime);
}, false);

function formatTime(time) {
  var
    minutes = Math.floor(time / 60) % 60,
    seconds = Math.floor(time % 60);

  return   (minutes < 10 ? '0' + minutes : minutes) + ':' +
           (seconds < 10 ? '0' + seconds : seconds);
}

})();

<div class="fullscreen-bg">
     <video loop="" muted="false" autoplay="" poster="pavel.jpg" class="fullscreen-bg__video">
        <source src="pavel8.mp4" type="video/mp4">
    </video>
</div>
</body>
</html>