Tuesday, March 28, 2023
/* Customize the appearance of the video player */
video {
width: 100%;
height: auto;
background-color: #000;
}
/* Hide the default controls */
video::-webkit-media-controls {
display: none !important;
}
video::-webkit-media-controls-enclosure {
display: none !important;
}
/* Add a custom play button */
.play-button {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 64px;
height: 64px;
background-color: rgba(0, 0, 0, 0.5);
border-radius: 50%;
cursor: pointer;
}
.play-button:before {
content: "\25B6";
font-size: 32px;
line-height: 64px;
color: #fff;
text-align: center;
}
/* Add an event listener for the play button */
var video = document.querySelector('video');
var playButton = document.querySelector('.play-button');
playButton.addEventListener('click', function() {
video.play();
playButton.style.display = 'none';
});
Subscribe to:
Post Comments (Atom)
-
a blog post about the Ruwanwelisaya Stupa in Anuradhapura, Sri Lanka: Ruwanwelisaya Stupa: A Symbol of Buddhist Devotion in Anuradhapura A...
-
Sri Lanka, also known as the “Pearl of the Indian Ocean,” is a beautiful country located in South Asia. With its stunning beaches, lush gr...
No comments:
Post a Comment