Pages

Wednesday 24 November 2021

Embedding Video without next video

 

How to embed YouTube videos and not have other videos showing at the end of the video.


Embed code example



Here is an example of the embed code copied from YouTube with the extra code added in bold (and red).
 <iframe width="560" height="315" src="https://www.youtube.com/embed/i0sOq7EbQWI?rel=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>


Change the width and height to fit nicely

I use an aspect ratio calculator to ensure I preserve the correct ratio. https://andrew.hedges.name/experiments/aspect_ratio/


Full Screen

Unfortunately, full screen is not available using this embed method. Learners can use the pinch gesture to make the video bigger on their screen.



No comments:

Post a Comment