Не отображается блок видео
Имею данную ситуацию
`<div class="hml__video-container" class="video-container"><div class="video-button"></div>
<video class="hml__video" src="https://www.youtube.com/watch?v=gXlXNshaVzk"></video></div>`
`.hml__video-container {
display: flex;
align-self: flex-end;
align-items: center;
width: 600px;
max-height: 320px;
border-radius: 5px;
border: solid 1px #061e37;
background: url(../img/BGproject.png) center no-repeat;
background-size: 690px auto;
position: relative;
z-index: 1;
&:before {
padding-top: 56.25%;
content: "";
}
& video {
width: 100%;
height: 100%;
position: relative;
z-index: 3;
pointer-events: none;
}
}
Ответы (1 шт):
Автор решения: Max Watson
→ Ссылка
1. Вариант
Вставить видео как предлагает YouTube:
<iframe width="560" height="315" src="https://www.youtube.com/embed/gXlXNshaVzk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
2. Варинат
Заменить вашу строчку
<video class="hml__video" src="https://www.youtube.com/watch?v=gXlXNshaVzk"></video>
На эту
<iframe src="https://www.youtube.com/embed/gXlXNshaVzk"></iframe>
