How To Add A YouTube or Vimeo Video To Your Website

Video is a dynamic element that adds life and movement to an otherwise static page. Having a video of the inside of your clinic, testimonial, sharing health information or exercises, and other value will help increase the engagement with your prospective patients. In this short video, you'll see how to add a video to any page.

Remove Related Videos at the End

If you are embedding a video and you find that there are " Related Videos" after your video ends, these will distract viewers and some will leave your website and go to YouTube or they will start watching other content. You'll need to grab the VIDEO ID from your YouTube video and head to this website

https://www.maxlaumeister.com/articles/hide-related-videos-in-youtube-embeds/

Here is the code that you will need to put your VIDEO ID in. Right in the middle of this code, you'll see "XXXXXXXXXXX". Simply replace the "XXXXXXXXXXX" with your VIDEO ID.

<!--  https://maxl.us/hide-related --><style>.hytPlayerWrap{display:  inline-block; position:  relative;}.hytPlayerWrap.ended::after{content:""; position: absolute;  top: 0; left: 0; bottom: 0; right: 0; cursor: pointer; background-color:  black; background-repeat: no-repeat; background-position: center;  background-size: 64px 64px; background-image:  url(data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiB2aWV3Qm94PSIwIDAgNTEwIDUxMCI+PHBhdGggZD0iTTI1NSAxMDJWMEwxMjcuNSAxMjcuNSAyNTUgMjU1VjE1M2M4NC4xNSAwIDE1MyA2OC44NSAxNTMgMTUzcy02OC44NSAxNTMtMTUzIDE1My0xNTMtNjguODUtMTUzLTE1M0g1MWMwIDExMi4yIDkxLjggMjA0IDIwNCAyMDRzMjA0LTkxLjggMjA0LTIwNC05MS44LTIwNC0yMDQtMjA0eiIgZmlsbD0iI0ZGRiIvPjwvc3ZnPg==);}.hytPlayerWrap.paused::after{content:"";  position: absolute; top: 70px; left: 0; bottom: 50px; right: 0; cursor:  pointer; background-color: black; background-repeat: no-repeat;  background-position: center; background-size: 40px 40px;  background-image:  url(data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHdpZHRoPSIxNzA2LjY2NyIgaGVpZ2h0PSIxNzA2LjY2NyIgdmlld0JveD0iMCAwIDEyODAgMTI4MCI+PHBhdGggZD0iTTE1Ny42MzUgMi45ODRMMTI2MC45NzkgNjQwIDE1Ny42MzUgMTI3Ny4wMTZ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+);}</style><div > <div>  <iframe width="640" height="360" src="https://www.youtube.com/embed/XXXXXXXXXXX?rel=0&enablejsapi=1"  frameborder="0" ></iframe>  </div></div><script>"use strict";  document.addEventListener('DOMContentLoaded', function(){if  (window.hideYTActivated) return; let  onYouTubeIframeAPIReadyCallbacks=[]; for (let playerWrap of  document.querySelectorAll(".hytPlayerWrap")){let  playerFrame=playerWrap.querySelector("iframe"); let  tag=document.createElement('script');  tag.src="https://www.youtube.com/iframe_api"; let  firstScriptTag=document.getElementsByTagName('script')[0];  firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); let  onPlayerStateChange=function(event){if  (event.data==YT.PlayerState.ENDED){playerWrap.classList.add("ended");}else  if  (event.data==YT.PlayerState.PAUSED){playerWrap.classList.add("paused");}else  if  (event.data==YT.PlayerState.PLAYING){playerWrap.classList.remove("ended");  playerWrap.classList.remove("paused");}}; let player;  onYouTubeIframeAPIReadyCallbacks.push(function(){player=new  YT.Player(playerFrame,{events:{'onStateChange':  onPlayerStateChange}});}); playerWrap.addEventListener("click",  function(){let playerState=player.getPlayerState(); if  (playerState==YT.PlayerState.ENDED){player.seekTo(0);}else if  (playerState==YT.PlayerState.PAUSED){player.playVideo();}});}window.onYouTubeIframeAPIReady=function(){for  (let callback of onYouTubeIframeAPIReadyCallbacks){callback();}};  window.hideYTActivated=true;});</script>

Still need help? Contact Us Contact Us