Since a lot of the great video we get these days is from sources like MSNBC and other non YouTube sources I am going to show you how to quickly embed those here at the Kos. I have seen a lot people having problems with it, from diarists to commentators, so hopefully this clears it up.
The problem is many of these use "iframe" tags to embed video. They work in your previews, but when you go to publish they don't render because dKos does not allow them.
The reason these other videos sources are important to be able to embed to get is because they either:
- Are not published on YouTube, or at least not very quickly.
- Prohibited from YouTube or pulled down shortly after posting for copyright or other reasons.
Now when you need to this, or you see others having this problem in the comments, you can reference this diary.
Once you do this one time, it will seriously only take around 30 seconds to do for any video. Not much longer than simply copy/pasting the YouTube embed code.
UPDATE: After deciphering a couple random website video embedding solutions to put them on the dKos, I realize that some still rely on the old "object" style. If you have any problems and have a video site you'd love to be able to get videos off of that this doesn't work for, post a comment and I'll get you a one off solution if you will be using it often enough to justify it! No charge! ;) - end update
A lot of the best videos we get are from MSNBC since we have a small and rare group of hosts that actually give us some newsworthy information and reporting.
I will use MSNBC video as the example, though this can be applied to ANY video, on ANY site which uses Flash video (90%+ of online video) as opposed to Quicktime, Real, WMV, etc...
On sites that give you an embed code that starts with "<embed ...", such as YouTube, you don't need to do this. On sites that give you "<iframe ..." or any other embedding code, you do have to do this. MSNBC gives you an "<iframe>" style embed.
Step 1
If you do not use Firefox as your web browser, you need to get it. Heck, even if you don't plan on using these videos, and you use Internet Explorer, you need to get it. Firefox is faster, more secure, more stable... just better.
Step 2
Install the free Firebug addon for Firefox. This tool is used for inspecting and debugging websites.
Step 3
Navigate to a MSNBC video. I will use this one as the example:
http://www.msnbc.msn.com/...
Click the "embed" button on the video. It will give you this code:
<iframe height="339" width="425" src="http://www.msnbc.msn.com/id/22425001/vp/27328627#27328627" frameborder="0" scrolling="no"></iframe>
Take the URL (web address) from the code. The URL is what is inside of the ' src="" ' portion of that code. In this case it is:
http://www.msnbc.msn.com/id/22425001/vp/27328627#27328627
Step 4
Open the URL you found in step 3 by copying it into your address bar.
You should now see the video all by itself.
In the bottom right part of your browser you should see a little bug, which is the icon for Firebug (note: sometimes it will say something like "2 Errors" in red instead of the bug icon if you have already ran it before on that site and there is an error present, this is normal).
Click the icon (on your first use it may bring up a box that asks you what to debug, which 3 checkboxes. Go ahead and check them all and click OK if it does).
You will now see a "console" window.
Click the "Inspect" button.
Now hover your mouse over the video. You will see a highlighted section of code appear which begins with "<embed ..."
This highlighted chuck of code is the gold we were looking for, and it is compatible with the Kos site.
Step 5
In this example I ended up with this code:
<embed height="339" align="top" width="425" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" allowscriptaccess="always" seamlesstabbing="true" allowfullscreen="true" wmode="window" devicefont="false" menu="false" id="fl20172813" name="fl20172813" mayscript="" salign="tl" scale="noborder" quality="Best" bgcolor="#000000" loop="true" play="true" swliveconnect="TRUE" src="http://msnbcmedia.msn.com/i/msnbc/Components/Video/_Player/configurations/eplayerv2.swf?domain=
www.msnbc.msn.com&settings=22425448&useProxy=true&wbDomain=www.msnbc.msn.com&launch=
27328627&sw=1280&sh=800&EID=oVPEFC&playerid=22425001"/>
However, when posting comments, the Kos doesn't like all of the extra attributes in here (the site will tell you which are invalid when trying to post a comment), so we have to eliminate them.
When trying to post that code the site says:
Your HTML has the following errors:
* Attribute tl" for tag embed is not allowed
* Attribute loop for tag embed is not allowed
* Attribute mayscript for tag embed is not allowed
* Attribute devicefont for tag embed is not allowed
* Attribute menu for tag embed is not allowed
* Attribute play for tag embed is not allowed
* Attribute scale for tag embed is not allowed
So here is what I remove from the snippet:
salign="tl"
loop="true"
mayscript=""
devicefont="false"
menu="false"
play="true"
scale="noborder"
With this being the final code that works:
<embed height="339" align="top" width="425" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" allowscriptaccess="always" seamlesstabbing="true" allowfullscreen="true" wmode="window" id="fl20172813" name="fl20172813" quality="Best" bgcolor="#000000" swliveconnect="TRUE" src="http://msnbcmedia.msn.com/i/msnbc/Components/Video/_Player/configurations/eplayerv2.swf?domain=
www.msnbc.msn.com&settings=22425448&useProxy=true&wbDomain=www.msnbc.msn.com&launch=
27328627&sw=1280&sh=800&EID=oVPEFC&playerid=22425001"/>
This now works!
One thing, if you have a more than one space (spacebar) between any of the attributes you will get this error:
Your HTML has the following error:
* Attribute quality for tag embed is not allowed
Just remove any extra white space and it will then work!
Again, this isn't any breaking news, just putting this up officially so it can be referenced for anyone wondering how I am able to embed MSNBC videos in the comments like this one.
Now, for a test, why don't you pick out your favorite video on MSNBC and post a comment and we'll see who has mastered this and who needs some pointers. ;)
Anytime you see someone having trouble with those pesky iframe embeds on MSNBC in the comments, just shoot them this way!