Youtube iframe video embed code can be used to embed a slice of a video using extra parameters start
and end
. These are the steps to embed video slice.
- Visit the video page, click share and then embed.
- You should be able to see the following embed code. This can be used to embed the full video.
<iframe width="560" height="315" src="https://www.youtube.com/embed/NxJ0W-yz0LQ" frameborder="0" allowfullscreen></iframe>
- Now add start=20 and end=25 parameters as shown below. This code can be used to embed video which will start at 20 seconds and play for 5 seconds (till 25 seconds).
<iframe width="560" height="315" src="https://www.youtube.com/embed/NxJ0W-yz0LQ?start=20&end=25" frameborder="0" allowfullscreen></iframe>