Sha256: 5707bb55bc9dd2c68443ca47c73689a0fdb255c8e2b804e4452562492ec67aa3
Contents?: true
Size: 1000 Bytes
Versions: 12
Compression:
Stored size: 1000 Bytes
Contents
!function(e,t){"use strict";var a,n={options:{el:".js-background-video"},init:function(){if(this.$element=t.querySelector(this.options.el),!this.$element)return!1;this.$elementVideoId=this.$element.getAttribute("data-video"),this.$videoOverlay=t.querySelector(".js-video-overlay"),this.addListeners()},addListeners:function(){var t=this.$elementVideoId,a=this.$videoOverlay;e.onYouTubeIframeAPIReady=function(){return new e.YT.Player("yt-player",{width:"1920",height:"1080",videoId:t,playerVars:{autoplay:1,mute:1,autohide:1,modestbranding:1,rel:0,showinfo:0,controls:0,disablekb:1,enablejsapi:1,iv_load_policy:3,loop:1,playlist:t},events:{onReady:e.onPlayerReady,onStateChange:e.onPlayerStateChange}})},e.onPlayerReady=function(e){e.target.playVideo()},e.onPlayerStateChange=function(t){t.data===e.YT.PlayerState.PLAYING&&a.classList.add("video-head__overlay--fadeOut")}}};a=function(){n.init()},"loading"!==document.readyState?a():document.addEventListener("DOMContentLoaded",a)}(window,document);
Version data entries
12 entries across 12 versions & 1 rubygems