Skip to content

video embeds

Aaron Hans edited this page Sep 8, 2021 · 3 revisions

Embedded videos

We have a video embed on the homepage as of 9/8/21 in code here https://github.com/cagov/digital.ca.gov/blob/main/pages/index.html#L31 this code:

<div class="videoWrapper">
  <iframe width="560" height="315" src="https://www.youtube.com/embed/sGRhmDdM3DU" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>

adds a videoWrapper element around the iframe code provided by the youtube embed tool in order to make it behave responsibly.

Going to the video page on youtube and getting the embed code from the share widget will give you this part of the code so you can swap in a new video with a different embed code:

<iframe width="560" height="315" src="https://www.youtube.com/embed/sGRhmDdM3DU" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Clone this wiki locally