hydecorp / hydejack

A boutique Jekyll theme for hackers, nerds, and academics
https://hydejack.com
Other
1.42k stars 804 forks source link

Embedding Video in Projects #304

Closed raminf closed 2 years ago

raminf commented 2 years ago

This was brought up as an issue (#35) a while back.

The recommendation was to wrap the native player in an iFrame.I tried it with Youtube and nothing showed up on the page.

Any updated suggestions on embedding videos?

raminf commented 2 years ago

Fixed it by going to the Youtube site, clicking on "Share" button, then "Embed." If you modify the code they list and add the attributes and width/height from issue #35, it works.

For example:

<div class="sixteen-nine">
  <iframe src="https://www.youtube.com/embed/{URL}" title="YouTube video player" frameborder="0" 
 allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
 style="width:100%;height:100%;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>