FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Replaced with poster attribute. by Alligatore3 · Pull Request #26 · john-smilga/javascript-basic-projects · GitHub

Repository navigation

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .css  (1) .html  (1) .js  (1) All 3 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
7 changes: 0 additions & 7 deletions 9-video/final/app.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,3 @@ btn.addEventListener("click", function () {
video.play();
}
});

// preloader
const preloader = document.querySelector(".preloader");

window.addEventListener("load", function () {
preloader.classList.add("hide-preloader");
});
65 changes: 32 additions & 33 deletions 9-video/final/index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Video</title>

<!-- styles -->
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<!-- preloader -->
<div class="preloader">
<img src="preloader.gif" alt="preloader" class="preloader__item" />
</div>
<!-- header -->
<header>
<video controls muted autoplay loop class="video-container">
<source src="./video.mp4" type="video/mp4" />
</video>
<h1>video project</h1>
<!-- video switch -->
<button class="switch-btn">
<span>
play
</span>
<span>
pause
</span>
<span class="switch"></span>
</button>
</header>
<!-- javascript -->
<script src="app.js"></script>
</body>
</html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Video</title>

<!-- styles -->
<link rel="stylesheet" href="styles.css" />
</head>

<body>
<!-- header -->
<header>
<video poster="preloader.gif" controls muted autoplay loop class="video-container">
<source src="./video.mp4" type="video/mp4" />
</video>
<h1>video project</h1>
<!-- video switch -->
<button class="switch-btn">
<span>
play
</span>
<span>
pause
</span>
<span class="switch"></span>
</button>
</header>
<!-- javascript -->
<script src="app.js"></script>
</body>

</html>
19 changes: 0 additions & 19 deletions 9-video/final/styles.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -180,25 +180,6 @@ main {
Video
===============
*/
.preloader {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--clr-white);
display: grid;
justify-content: center;
align-items: center;
visibility: visible;
z-index: 999;
transition: var(--transition);
}
.hide-preloader {
z-index: -999;
visibility: hidden;
}

header {
min-height: 100vh;
position: relative;
Expand Down

Back | FazBrowse Home | New Git URL