(no subject)
Apr. 8th, 2011 05:34 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
If you've visited this site lately, you'll have noticed that I've had no end of problems with the videos. First, there was a bug with Dreamwidth that would modify other posts than the one you were editing (!!!) and change the URL of the videos in those to the one you just added. Once that was fixed (yeah, Dreamwidth team!), I apparently had screwed up the HTML I was using. The problem is that the "embed" code given by YouTube these days seems to work on LJ, but not Dreamwidth, so it's been a challenge finding something that works. Well, I finally did and I've reposted all my videos using the new code (and added a Money Mark video to a post that didn't have one, but should have, heh). So I don't forget, and so you can use it too... here's the code I'm using now (works great for crossposting to LJ as well). All you need to do is put the size you want it to display in your page in both places (width/height need to match in both tags... I chose 480x390, there's nothing particularly magical about it), and then insert the coded tag from YouTube into the code in two places as well (it's "9WiU7cMDrx8" in the sample code below... replace this with what you are given by YouTube from either the link or embed code, or your URL bar).
<center><object width="480" height="390"><param name="movie" value="http://www.youtube.com/v/9WiU7cMDrx8?fs=1&hl=en_GB" /><param name="allowFullScreen" value="true" /><embed src="http://www.youtube.com/v/9WiU7cMDrx8?fs=1&hl=en_GB" type="application/x-shockwave-flash" allowfullscreen="true" width="480" height="390" /></object></center>
Once you've posted, if you go back and edit the post, you will notice that "site-embed" code has been automatically added to the post by Dreamwidth (LJ does this too). If I need to edit an entry, I go ahead and delete the start and end tags and let Dreamwidth re-create them. They look something like this (don't delete the "object" tags or anything inside them):
<site-embed id="9"><object ...>[...]</object></site-embed>
<center><object width="480" height="390"><param name="movie" value="http://www.youtube.com/v/9WiU7cMDrx8?fs=1&hl=en_GB" /><param name="allowFullScreen" value="true" /><embed src="http://www.youtube.com/v/9WiU7cMDrx8?fs=1&hl=en_GB" type="application/x-shockwave-flash" allowfullscreen="true" width="480" height="390" /></object></center>
Once you've posted, if you go back and edit the post, you will notice that "site-embed" code has been automatically added to the post by Dreamwidth (LJ does this too). If I need to edit an entry, I go ahead and delete the start and end tags and let Dreamwidth re-create them. They look something like this (don't delete the "object" tags or anything inside them):
<site-embed id="9"><object ...>[...]</object></site-embed>