{"id":163,"date":"2009-08-12T16:45:00","date_gmt":"2009-08-12T21:45:00","guid":{"rendered":"http:\/\/www.borgh.us\/2009\/08\/12\/swfobject-2-0-and-multiple-videos-on-your-blog-front-page"},"modified":"2009-08-12T16:45:00","modified_gmt":"2009-08-12T21:45:00","slug":"swfobject-2-0-and-multiple-videos-on-your-blog-front-page","status":"publish","type":"post","link":"https:\/\/www.borgh.us\/?p=163","title":{"rendered":"SWFObject 2.0 and multiple videos on your blog front page"},"content":{"rendered":"<p>So with as easy as posting videos is from Windows Live Writer, a problem that bugs me is their use of the &lt;embed&gt; tag and its non-compliance to web standards. Of course leave the tag out and many browsers won\u00e2\u20ac\u2122t work properly.<\/p>\n<p>Through a couple of pieces of information from multiple places I finally figured it out.<\/p>\n<p>First step is to download <a href=\"http:\/\/code.google.com\/p\/swfobject\/\" target=\"_blank\">swfobject 2.0<\/a>.<\/p>\n<p>Next is to of course include the swfobject code into your page. Do this by including the following into the &lt;head&gt; of your blog (likely located in header.php or something similar):    <br \/><code>&lt;script type=&quot;text\/javascript&quot; src=&quot;swfobject.js&quot;\/&gt;<\/code> <\/p>\n<p>Finally include the following code block where you want your video placed in the post:<\/p>\n<p><code>&lt;div align=&quot;center&quot; id=&quot;mov2009081101&quot;&gt;      <br \/>&#160;&#160;&#160; You need the Flash Player to view this video.       <br \/>&lt;\/div&gt;       <br \/>&lt;script type=&quot;text\/javascript&quot;&gt;       <br \/>&#160;&#160;&#160; \/*&lt;!--*\/       <br \/>&#160;&#160;&#160; var flashvars = {};       <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var params = {};       <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var attributes = {};       <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; attributes.id = &quot;swf2009081101&quot;;       <br \/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; swfobject.embedSWF(&quot;http:\/\/www.youtube.com\/v\/2Fb-p5TkAE4&amp;amp;hl=en&quot;, &quot;mov2009081101&quot;, &quot;425&quot;, &quot;355&quot;, &quot;9.0.0&quot;, false, flashvars, params, attributes);       <br \/>&#160;&#160;&#160; \/*--&gt;*\/       <br \/>&lt;\/script&gt;&#160;&#160;&#160; <br \/>&lt;\/div&gt;<\/code><\/p>\n<p>You will need to replace \u00e2\u20ac\u0153mov2009081101\u00e2\u20ac\u009d and \u00e2\u20ac\u0153swf2009081101\u00e2\u20ac\u009d in all places with two different strings unique to the movie. The problem is if you have multiple movies on a page, whether the front page, a category listing, or whatever, duplicate ids will conflict. The ones I included above were simply the date of the blog and a 2 digit enumeration. With all of this done, flash videos should now be viewable for everyone AND your page should pass W3C validation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So with as easy as posting videos is from Windows Live Writer, a problem that bugs me is their use&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[18,5,19],"tags":[],"class_list":["post-163","post","type-post","status-publish","format-standard","hentry","category-blogging","category-geek-stuff","category-programming"],"_links":{"self":[{"href":"https:\/\/www.borgh.us\/index.php?rest_route=\/wp\/v2\/posts\/163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.borgh.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.borgh.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.borgh.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.borgh.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=163"}],"version-history":[{"count":0,"href":"https:\/\/www.borgh.us\/index.php?rest_route=\/wp\/v2\/posts\/163\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.borgh.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.borgh.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.borgh.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}