title: Setting Keyboard Focus to YouTube Embed
body: <p>I’m trying to find a way to get the keyboard to focus on the YouTube player in my page. This could, for example, make it easy to use the space bar to play/pause the video.</p>
  
  <p>Here’s an example: <a href="http://codepen.io/jifarris/pen/qOGoVG" rel="noreferrer">Testing Embed Keyboard Focus (CodePen)</a></p>
  
  <p>As it is, I’m having to click on the player for it to be able to accept keyboard shortcuts. Because this is not ideal, I’m hoping for a workaround using Javascript or jQuery to set the focus on the video.</p>
  
  <p>I’m aware that – as an alternative – I could use the spacebar key to call the player object's <code>playVideo</code> or <code>pauseVideo</code> methods, but that still wouldn’t get me access to the full list of the YouTube player’s keyboard controls.</p>
  
  <p>And if this is simply impossible, I’ll understand. But it will be nice to know. Thanks!</p>