Inserting video content into a LiveJournal comment
Yesterday I was looking for good instructions on inserting video content into a LiveJournal comment (for someone else) and couldn't find any. So, after being successful, I felt it my geek duty to write up my directions in case, some day someone else needs them. It's a calling, I guess?
LiveJournal's post editor very easily supports inserting media content into posts. There's a semi-friendly GUI which lets you insert an
<embed> block from any major video hosting site (e.g. youtube, photobucket, vimeo, etc.) quickly and easily. The comment editor, however, is just a textarea, so if you want any formatting you're left to write the HTML yourself. This is no big deal for some, but even most HTML novices only know the basic five html 4.01 tags (a, img, b, i, u), which are fine for 99% of such situations.
As an aside, I would love to rid the world of the non-xhtml-compliant formatting tags, but perhaps that's just me.
Posting video is a tad more work, though youtube, for instance, makes it painfully easy. They provide a handy dialog to the right of any video with all of the necessary
<object> code. You can even customize the background, size, inclusion of related videos, etc. I have to hand it to the folks at
youtubegoogle for understanding that their videos should be able to be seen from anywhere, not just their main site.
Well, anyway, youtube wasn't my problem. Photobucket was. They provide you with an
<embed> link only, and while that's fine for the LJ post editor, it's incomplete. Here's a few quick steps to add the code necessary to adapt what Photobucket gives you to what is needed for a video to show up in a LiveJournal comment.
1 2 3 4 5 6
Using the Youtube code as a reference, you only have to make a couple of changes:
1. Replace the
<embed src=""> code with what Photobucket provides:
1 2 3 4 5 6
2. Your photobucket video dimensions may be different, so you'll need to fix the height and width in both locations: the
<object> tag and the
1 2 3 4 5 6
...and that's it. It's not at all difficult, but if you're someone (else) that doesn't need or want to know the difference between an
<object> tag and an
<embed> tag and why you need both to properly display inline video, a couple of simple steps to make your online life easier can make all the difference.