Skip to content

Commit

Permalink
Merge pull request #150 from hlxsites/feature/youtubevideo-fix
Browse files Browse the repository at this point in the history
bug fixes for youtube video player
  • Loading branch information
davenichols-DHLS authored Nov 20, 2023
2 parents 6355692 + 070a140 commit 81b7f0e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 0 additions & 6 deletions blocks/embed/lite-yt-embed/lite-yt-embed.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,10 @@ lite-youtube > .lty-playbtn {
background-color: transparent;
/* YT's actual play button svg */
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');
filter: grayscale(100%);
transition: filter .1s cubic-bezier(0, 0, 0.2, 1);
border: none;
}

lite-youtube:hover > .lty-playbtn,
lite-youtube .lty-playbtn:focus {
filter: none;
}

/* Post-click styles */
lite-youtube.lyt-activated {
cursor: unset;
Expand Down
1 change: 1 addition & 0 deletions blocks/embed/lite-yt-embed/lite-yt-embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class LiteYTEmbed extends HTMLElement {
playBtnEl = document.createElement('button');
playBtnEl.type = 'button';
playBtnEl.classList.add('lty-playbtn');
playBtnEl.setAttribute('title', this.playLabel);
this.append(playBtnEl);
}
if (!playBtnEl.textContent) {
Expand Down

0 comments on commit 81b7f0e

Please sign in to comment.