Bojan Vidanovic has a helpful post about better emedding of youtube videos in jekyll.

I won’t cover most of the details but it essentially boils down to adding a short javascript script to your site that swaps out the static thumbnail with the youtube embed link after the thumbnail is clicked. I’m sure it’s been done before but here is the orginal script as it was posted in the link above.

//I've made a very minor fix by replacing a trailing ; with {} 
//to make the while statment syntactically more correct.
function findAncestor (el, sel) {
  while ((el = el.parentElement) && !((el.matches || el.matchesSelector).call(el,sel))){}
  return el;
}

function playVideo(id, e){
  // Create an iFrame with autoplay set to true
  var iframe = document.createElement("iframe");
  var iframe_url = "https://www.youtube-nocookie.com/embed/" + id + "?rel=0&autoplay=1&autohide=1";
  iframe.setAttribute("src", iframe_url);
  iframe.setAttribute("frameborder", "0");
  iframe.setAttribute("allowfullscreen", "true");

  // Replace the YouTube thumbnail with YouTube Player
  var video_wrapper = findAncestor(e, ".yt");
  video_wrapper.innerHTML = "";
  video_wrapper.appendChild(iframe);
}