Skip to content
Snippets Groups Projects
Commit c121fffa authored by Olivia206's avatar Olivia206
Browse files

js

parent 6d683795
No related branches found
No related tags found
No related merge requests found
// function stopThis(){
// var iframe = container.getElementsByTagName("iframe")[0];
// var url = iframe.getAttribute('src');
// iframe.setAttribute('src', '');
// iframe.setAttribute('src', url);
// }
const videos = document.querySelectorAll('.block-video');
class videoPlayer {
constructor (dom) {
this.dom = dom;
this.player = this.dom.querySelector('.video-player');
this.player = this.dom.querySelector('.lazy-video-player');
if (this.player) {
this.playBtn = this.player.querySelector('button');
}
......
......@@ -6,7 +6,7 @@
img
min-height: 400px
position: relative
&-player
.lazy-video-player
align-items: center
height: 100%
display: flex
......
{{ if .video.poster }}
<div class="video-player">
<button class="video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button>
<div class="lazy-video-player">
<button class="lazy-video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button>
<img src="{{ .video.poster }}" alt="{{ .video_title }}">
</div>
{{ end }}
......
{{ if .video.poster }}
<div class="video-player">
<button class="video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button>
<div class="lazy-video-player">
<button class="lazy-video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button>
<img src="{{ .video.poster }}" alt="{{ .video_title }}">
</div>
{{ end }}
......
{{ if .video.poster }}
<div class="video-player">
<button class="video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button>
<div class="lazy-video-player">
<button class="lazy-video-player__play" title ="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button>
<img src="{{ .video.poster }}" alt="{{ .video_title }}">
</div>
{{ end }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment