Skip to content

Instantly share code, notes, and snippets.

@cave2006
Last active April 14, 2021 12:20
Show Gist options
  • Save cave2006/d49e365f54936ea87284d45d486f311a to your computer and use it in GitHub Desktop.
Save cave2006/d49e365f54936ea87284d45d486f311a to your computer and use it in GitHub Desktop.
вставляем видео с YT фоновым видео + добавим чат
<style>
.example-marquee {
position: relative;
}
.content {
display: table;
width: 100%;
padding-bottom: 56.25%;
z-index: 1;
position: relative;
}
.content .inner {
display: table-cell;
vertical-align: middle;
text-align: center;
padding-left: 16px;
padding-right: 16px;
}
.video-background-controls button {
font-size: 32px;
display: inline-block;
padding: 0px;
margin: 0px;
height: 32px;
width: 32px;
border-radius: 16px;
line-height: 32px;
border: none;
background: none;
-webkit-appearance: none;
color: white;
filter: drop-shadow(0px 0px 1px black);
cursor: pointer;
opacity: 1;
transition: all 250ms ease-in-out;
margin-left: 10px;
}
.video-background-controls button:hover {
opacity: 0.5;
}
iframe {
transition: opacity 500ms ease-in-out;
transition-delay: 250ms;
width: 104% !important;
}
</style>
<script type="text/javascript" src="https://gis-media.ru/jquery.youtube-background-new.js"></script>
<script src="https://kit.fontawesome.com/228006f19a.js" crossorigin="anonymous"></script>
<div class="example-marquee">
<div id="ytbg2" data-ytbg-play-button="true" data-youtube="https://www.youtube.com/watch?v=0eS7amQ_Sw0"></div>
<div class="content">
<div class="inner">&nbsp;</div>
</div>
</div>
<!--<div class="">
<iframe width="150px" height="100px" src="https://www.youtube.com/live_chat?v=0eS7amQ_Sw0&amp;embed_domain=event360.zerno.agency"></iframe>
</div>
-->
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('[data-youtube]').youtube_background();
});
</script>
eDM0k9Wo4Ew
79537777891@yandex.ru
zaq1mju7
<link rel="stylesheet" href="https://cdn.plyr.io/3.6.3/plyr.css" />
<script src="https://cdn.plyr.io/3.6.3/plyr.js"></script>
<div class="plyr__video-embed">
<div id="player1" data-plyr-provider="youtube" data-plyr-embed-id="GCObZDp5pbg"></div>
</div>
<script>
new Plyr('#player1', {
'fullscreen': { enabled: true, fallback: true, iosNative: true, container: null }
});
</script>
-yZXhL9YZto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment