JSFiddle - React, Tailwind, and code Playground
HTML
<div id="captations">
<section>
<h1>CAPTATIONS ET TEASERS</h1>
<p> <img src="https://cdn.alsacreations.net/css/img/logo-alsacreations.svg" onclick="changevideo(1)" height="135px" width="240px" />
<video id="video" controls preload="none" poster="https://cdn.alsacreations.net/css/img/logo-alsacreations.svg" data-setup="{}" src="https://player.vimeo.com/external/216307767.hd.mp4?s=80567c4a596a55e6a3016d67a38e9c140f8e4f31&profile_id=119" type="video/mp4"
/>
</p>
</section>
</div>
CSS
section {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #e6e6e6;
max-width: 1050px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
margin-bottom: 30px;
padding: 20px;
border-radius: 20px;
}
p {
display: flex;
align-items: baseline;
justify-content: center;
flex-wrap: wrap;
}
.video-js {
font-size: 10px;
color: #fff;
height: 270px;
width: 480px;
}
.vjs-default-skin .vjs-big-play-button {
font-size: 2em;
line-height: 1.5em;
height: 1.5em;
width: 1.5em;
border: 0.06666em solid #fff;
border-radius: 0.3em;
left: 50%;
top: 50%;
margin-left: -0.75em;
margin-top: -0.75em;
}
.video-js .vjs-control-bar,
.video-js .vjs-big-play-button,
.video-js .vjs-menu-button .vjs-menu-content {
background-color: #e6e6e6;
background-color: rgba(230, 230, 230, 0.3);
}
.video-js .vjs-slider {
background-color: white;
background-color: rgba(255, 255, 255, 0.5);
}
.video-js .vjs-volume-level,
.video-js .vjs-play-progress,
.video-js .vjs-slider-bar {
background: #fff;
}
.video-js .vjs-load-progress {
background: white;
background: rgba(255, 255, 255, 0.5);
}
.video-js .vjs-load-progress div {
background: white;
background: rgba(255, 255, 255, 0.75);
}
JavaScript
$('nav a').click(function() {
var page = $(this).attr('href');
var speed = 400;
$('html, body').animate({
scrollTop: $(page).offset().top - 130
}, speed);
return false;
});
Video = document.getElementById("video");
function changevideo(value) {
if (value == 1) {
Video.src = "https://player.vimeo.com/external/215988962.hd.mp4?s=7675f70ba2fd93ed4007e1cdbb38ff1c53367145&profile_id=119";
}
}