25. Januar 2021

Youtube Videos Start Time and Embedding

1. Link with a start time
   You can use the “long” link, the one with youtube in it. You can also use the short “Belgian” link to youtu.be! Example original link https://m.youtube.com/watch?v=NTItjfDy-js or equal https://youtu.be/NTItjfDy-js .
   To set the start time you must append the parameter t=… in parameter form, preceding with ?, or if it’s the second parameter with &. (If you use & for the first parameter, it usually works as well, even with =). The full format then is: https://m.youtube.com/watch?v=NTItjfDy-js&t=2m0s with v = view and the appended start time parameter (as second parameter i.e. with &) &t=2m0s . Obviously you cannot set an end time.
   If you are too lazy to do this by hand, go to https://youtubetime.com/ . It will however reject “Belgian” links.

2. Embedding the video into HTML
   Here’s a sample code, the HTML escape signs < smaller and greater > are all replaced by small French apostrophes ‹ and ›, so please convert them back before use and insert your specific video number both as the video to play and the title to show.

‹iframe allowfullscreen="" class="BLOG_video_class" height="532" src="https://www.youtube-nocookie.com/embed/NTItjfDy-js?start=120&end=155" width="640" youtube-src-id="NTItjfDy-js"›‹/iframe›

The Youtube video number here is NTItjfDy-js , to be started at 2m and stopped at 2m35s. You don’t need the class declaration, just leave out "BLOG_video_class", and it works just as fine. I tried!

And here how it looks like. There is too much height, I know, 532 pixels is too much for this old film. Just adapt height parameter to fit.

  

The full video is availabe to viewers, but just a selected part is shown, in this case from second 120 to second 155. Enjoy!

Permalink to here http://j.mp/fj3pj68nB
   = https://blogabissl.blogspot.com/2021/01/embedding-youtube-videos.html

 Besucherzaehler

Keine Kommentare: