I have updated these tips to include new information that has been provided in the comments that were made yesterday and to make the diary a little clearer and easier to follow.
YouTube videos used to be the easiest of all to embed into a diary. And then for some reason they changed the code. Who knows why.
For the Readers & Book Lovers Group I did a queued but unpublished diary on adding videos and photos to a diary. I am copying and pasting a portion of that diary that includes all of the steps to add a YouTube video as well as the fix for the new coding below the divider doodle.
YouTube Video
Find the video you want to use on YouTube. Scroll down to the area below the video and look for the word Share.
If you click on Share, this will appear:
Click on image to enlarge
Here you have the opportunity to set the time you want the video to start. In this example I have set the video to start at 14 minutes, clicked the start box and 14m was added to the code. If you want the video to start at the beginning, make sure the box remains unchecked.
Click Embed. The next step will depend on the choices you make. YouTube offers the option to show other videos after the one you have selected has ended. If that box is checked, it is a simple matter to then copy that code and paste it wherever in the diary you wish the video to appear:
Click on image to enlarge
Should you not want to include the selected videos that will appear when yours is complete, make sure the box is unchecked. Or if you wish to use the old embed code, make sure the box for that option is checked. Either selection will mean that you will then have to manually add http: to the code. On the second line of the code, after the letters src there is an = sign followed by " mark and the double /. (See the small oval in the image below.) After the " mark, and before the double backslash you have to manually type in http: There are no spaces between http and the quotation mark or between the colon and the double backslash.
Click on image to enlarge
I have made the changes on the YouTube page itself before I copied and pasted it into the diary. You may prefer to copy and paste the code as is and make the changes once you have pasted it into your diary.
Here is how the code should look:
Click on image to enlarge
And finally, you can center the video with the simple center command code. Just add it to the code for the video as shown here:
Click on image to enlarge
Results:
Original video code:
Centered video:
If you wish to align the video to the right hand side of the diary, and wrap the text around it, add the words
align="right" as shown:
Click on image to enlarge
Which looks like this:
The same can be done to wrap text around the video on the left hand side by changing the word "right" to "left." Make sure that the video is small enough that it allows room to wrap the text.
Finally
A terrific resource for all of the fun things you can do with a diary can be found in the
New Diarists Group diary list. But the most basic, even if a little dated with the new image library, and the one I relied on the most when I started writing R&BLers diaries is
this one by fiver because it includes basic formatting and embedding tips for videos other than YouTube.
Thanks to help from
Gooserock in the comments, I can include a demonstration of how to manually start and stop the video wherever you want. This particular video is a long one, and I don't want to bore the reader with the first 14 minutes which are introductory. (Note that in the example earlier in this diary I just used the automatic start function; what follows is another way to accomplish the same thing.)
Notice in this image of the corrected YouTube code, how a quotation mark follows rel=0
Click on image to enlarge
That is what we have to move in order to insert the code that will start the video where we want it. I want to start at minute 14. The code works with seconds so 14 times 60 equals 840. I insert my cursor to the left of the quotation marks and type a space, an ampersand (&) the word start an equal sign and the numbers 840
Click on image to enlarge
You can also stop the video wherever you want using the &end=xxx where xxx is the number of seconds. For this example I stopped the video at 850 seconds or ten seconds after it started.
Click on image to enlarge
And this is how it all works:
First video, the original.
This video is set to start at 14 minutes in.
And this one is set to start at 14 minutes in and end at 14 minutes and ten seconds.
Another Tip
From belinda ridgewood, which I incorporated into the diary above, but should help some diarists understand why they may have had problems getting their You Tube videos to embed lately.
Note that, as of several days ago, Daily Kos has fixed their code so that the iframe embed code works without the addition of "http:". (The iframe code is the default embed code, that is, the code that is offered to you when you first click "embed".)
Those people who prefer to check "use old embed code" and get the alternate code will still need to add "http:" as you describe. People have various reasons to choose that option, but some simply don't know that, unlike in past versions of Daily Kos, it is now possible to use the iframe code here.
The other case in which someone would have to tweak the embed code with "http:" is if they un-check "Show suggested videos when the video finishes". This option is pre-selected when you click on "embed", and for some reason, removing the check from the box causes even iframe code to require patching up.