Skip to content

Commit

Permalink
Merge pull request #101 from hlxsites/feature/vimeo-video-player
Browse files Browse the repository at this point in the history
Added block for vimeo player
  • Loading branch information
davenichols-DHLS authored Nov 14, 2023
2 parents 56d7e04 + 37fdd8b commit a735fdc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions blocks/vimeo/vimeo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default function decorate(block) {
const anchorLink = block.querySelector('a');
const ifrm = document.createElement('iframe');
ifrm.setAttribute('src', anchorLink);
ifrm.style.width = '800px';
ifrm.style.height = '600px';
ifrm.style.frameBorder = '0';
ifrm.style.allow = 'autoplay; fullscreen; picture-in-picture';
ifrm.setAttribute('allowFullScreen', '');
block.innerHTML = '';
block.append(ifrm);
}

0 comments on commit a735fdc

Please sign in to comment.