<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IT Blog &#187; video embed</title>
	<atom:link href="http://www.techfromhel.com/tag/video-embed/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techfromhel.com</link>
	<description>Information Technology - our Life</description>
	<lastBuildDate>Tue, 26 Jul 2011 13:21:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Flv Videos in a Thickbox</title>
		<link>http://www.techfromhel.com/2011/05/flv-videos-in-a-thickbox/</link>
		<comments>http://www.techfromhel.com/2011/05/flv-videos-in-a-thickbox/#comments</comments>
		<pubDate>Tue, 10 May 2011 14:15:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[thickbox]]></category>
		<category><![CDATA[video embed]]></category>

		<guid isPermaLink="false">http://www.techfromhel.com/?p=12</guid>
		<description><![CDATA[Embedding Videos: Flv Videos in a Thickbox <p>NOTE: This is an updated version of an article I originally wrote on September 6, 2007 that was posted on <a href="http://www.supernaturalstation.org/tech-tools/flv-video-thickbox/">SupernaturalStation.org</a>.</p> Step-by-step instructions on how to display a flash video (.flv) inside a thickbox* using JW&#8217;s Flvplayer <p>For those of you wondering how to implement JW&#8217;s Flv player inside [...]]]></description>
			<content:encoded><![CDATA[<h3>Embedding Videos: Flv Videos in a Thickbox</h3>
<p>NOTE: This is an updated version of an article I originally wrote on September 6, 2007 that was posted on <a href="http://www.supernaturalstation.org/tech-tools/flv-video-thickbox/">SupernaturalStation.org</a>.</p>
<h4>Step-by-step instructions on how to display a flash video (.flv) inside a thickbox* using JW&#8217;s Flvplayer</h4>
<p>For those of you wondering how to implement JW&#8217;s Flv player inside a Thickbox, it is actually quite simple. Here&#8217;s how:</p>
<ol>
<li><strong>If you don&#8217;t already have them, download jquery and ThickBox 3 and add them to your page&#8217;s head section</strong>jquery.js is available at <a href="http://docs.jquery.com/Downloading_jQuery">docs.jquery.com/Downloading_jQuery</a>.  ThickBox 3.1 is a group of files and images (thickbox.js,  thickbox-compressed.js, thickbox.css, loadingAnimation.gif, and  macFFhack.png) located at <a href="http://jquery.com/demo/thickbox/">jquery.com/demos/thickbox</a>. Download all the Thickbox files and install them in a single common directory, “thickbox”, on your web server.In your document head, add javascript links to jquery.js and  thickbox.js,  a style link for thickbox.css, and a javascript variable  definition that points to “loadinganimation.gif”, a graphic that  displays when thickbox is slow to load.<br />
<blockquote><p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;jquery.js&#8221;&gt;&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;thickbox/thickbox.js&#8221;&gt;&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt; var tb_pathToImage = &#8220;thickbox/loadingAnimation.gif&#8221;;&lt;/script&gt;<br />
&lt;style type=&#8221;text/css&#8221; media=&#8221;screen&#8221;&gt;@import &#8220;thickbox/thickbox.css&#8221;;&lt;/style&gt;</p></blockquote>
<p>Note: If your web site is on a slow server or if you just want to  keep your page load speed fast, you can replace jquery.js and  thickbox.js with their faster loading, compressed versions,  jquery-packed.js and thickbox-compressed.js, respectively.</li>
<li><strong>Next, download JW&#8217;s Flv Player or Media Player and add the included swfobject.js file to your page head</strong>Flv Player (or Media Player) can be downloaded from <a href="http://www.jeroenwijering.com/?item=JW_FLV_Player">www.jeroenwijering.com</a>.  Save the files, flvplayer.swf (or mediaplayer.swf) and swfobject.js, to  your web server, then add a javascript link to swfobject.js  in your  page&#8217;s head section
<pre>&lt;script type="text/javascript" src="swfobject.js"&gt;&lt;/script&gt;</pre>
<p>Note: If page load speed is an issue, you can omit “swfobject.js”  from the document head. swfobject.js is not actually used in this demo.  It is only included because of the slight chance that Flv player has an  internal reference to it.</li>
<li><strong>Then, in the body of your page create a hidden &lt;div&gt; with a unique id and embed the video there</strong>The &lt;div&gt; should have a unique id=&#8221;onPageHiddenContent-20&#8243; and a  style attribute of style=”display:none;” to keep it hidden until the  viewer clicks on a link that you specify in step #4 below. Inside the  &lt;div&gt;, place an &lt;embed&gt; tag to embed JW&#8217;s Flv Player,  flvplayer.swf, that you downloaded in step #2. List your flv video  (myvideo_file.flv) and your video preview image (myvideo_image.jpg) as  “flashvars” arguments in the embed tag.  See JW&#8217;s <a href="http://www.jeroenwijering.com/extras/readme.html">readme</a> instructions for more details about embedding a video with flvplayer.swf.<br />
<blockquote><p>&lt;div id=&#8221;onPageHiddenContent-20&#8243; style=&#8221;display:none;&#8221;&gt;<br />
&lt;embed src=&#8221;http://www.myfileserver.com/folder/flvplayer.swf&#8221;<br />
width=&#8221;320&#8243; height=&#8221;260&#8243; type=&#8221;application/x-shockwave-flash&#8221;<br />
pluginspage=&#8221;http://www.macromedia.com/go/getflashplayer&#8221;<br />
flashvars=&#8221;file=http://www.myfileserver.com/folder/myvideo_file.flv&amp;image=http://www.myfileserver.com/folder/myvideo_image.jpg&#8221; /&gt;<br />
&lt;/div&gt;</p></blockquote>
<p>In the above code, change the url paths, rename myvideo_file.flv and  myvideo_image.jpg to match your own video and adjust the height and  width as needed. You will also want to make sure that  height=video_height+20px to make room for the controller.</li>
<li><strong>Lastly, add a thickbox link element with to display the video inside a thickbox</strong>Use the thickbox inline* anchor, &#8220;#TB_inline&#8221; for the &#8220;href&#8221; and  include the thickbox dimensions (&gt;=video size) and your hidden div id  as query parameters. The link can surrounded any text or an image. See <a href="http://jquery.com/demo/thickbox/">thickbox inline content instructions</a> for more information.<br />
<blockquote><p>&lt;a href=&#8221;#TB_inline?height=270&amp;width=320&amp;inlineId=onPageHiddenContent-20&#8243;<br />
title=&#8221;My Video&#8221;&gt;Click here to see video&lt;/a&gt;</p></blockquote>
</li>
</ol>
<p>And thats all there is to it folks! Simple, eh?</p>
<p>Here&#8217;s the entire code in a sample web page:</p>
<div>
<blockquote><p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; dir=&#8221;ltr&#8221;&gt;&lt;head&gt;<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;js/jquery.js&#8221;&gt;&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;js/thickbox/thickbox.js&#8221;&gt;&lt;/script&gt;<br />
&lt;style type=&#8221;text/css&#8221; media=&#8221;screen&#8221;&gt;@import &#8220;js/thickbox/thickbox.css&#8221;;&lt;/style&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt; var tb_pathToImage = &#8221;thickbox/loadingAnimation.gif&#8221;;&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;js/swfobject.js&#8221;&gt;&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h2&gt;Flv Video in a Thickbox example&lt;/h2&gt;<br />
&lt;div id=&#8221;onPageHiddenContent-20&#8243; style=&#8221;display:none;&#8221;&gt;<br />
&lt;embed src=&#8221;http://www.myfileserver.com/folder/flvplayer.swf&#8221;<br />
width=&#8221;320&#8243; height=&#8221;260&#8243; type=&#8221;application/x-shockwave-flash&#8221;<br />
pluginspage=&#8221;http://www.macromedia.com/go/getflashplayer&#8221;<br />
flashvars=&#8221;file=http://www.myfileserver.com/folder/myvideo_file.flv&amp;image=http://www.myfileserver.com/folder/myvideo_image.jpg&#8221; /&gt;<br />
&lt;/div&gt;<br />
&lt;a href=&#8221;#TB_inline?height=270&amp;width=320&amp;inlineId=onPageHiddenContent-20&#8243;<br />
&lt;=&#8221;" nobr=&#8221;"&gt; title=&#8221;My Video&#8221;&gt;Click here to see video&lt;/a&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
</div>
<p>This method works in FF 1.5, FF 2, Safari 1**, Safari 3 beta, and IE  6. I have not tested it in other browsers, but it should work fine in  any modern browser.</p>
<p>As for you purists out there, yes…”embed” is not xhtml compliant, but  all modern browsers support it and that&#8217;s more important to your site  visitors.</p>
<p><strong>**Note</strong>: Please note that Thickbox no  longer works in Safari 1 when combined with any version of jquery   greater than version 1.1.2 and the combination, jquery 1.1.3+thickbox3,  actually causes Safari 1 to crash.</p>
<p><strong>*Important Note</strong>: This “inline”,  javascript-free method of embedding a flv video in a thickbox is  appropriate for simple web pages with just a few videos. If your  document has many videos or other flash content that affects z-index and  transparency settings, an “inline” thickbox will be problematic,  especially in IE. A better solution would be to embed your video in  external document/popup player that you can open in a thickbox “iframe”  instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techfromhel.com/2011/05/flv-videos-in-a-thickbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YouTube in a Thickbox</title>
		<link>http://www.techfromhel.com/2008/05/youtube-video-thickbox/</link>
		<comments>http://www.techfromhel.com/2008/05/youtube-video-thickbox/#comments</comments>
		<pubDate>Fri, 30 May 2008 13:54:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[thickbox]]></category>
		<category><![CDATA[video embed]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.techfromhel.com/?p=4</guid>
		<description><![CDATA[Embedding Videos: YouTube in a Thickbox <p>Note: This is a duplicate of an article I originally wrote on April 29, 2008 on the <a href="http://www.supernaturalstation.org/tech-tools/youtube-video-thickbox/">Supernatural Station website</a>.</p> <p>“Thickbox” is a great way to showcase a youTube video on your web site. Thickbox’s light box effect gives videos a dramatic, theatre-like feel. You only need to [...]]]></description>
			<content:encoded><![CDATA[<div>
<h3>Embedding Videos: YouTube in a Thickbox</h3>
<p>Note: This is a duplicate of an article I originally wrote on April 29, 2008 on the <a href="http://www.supernaturalstation.org/tech-tools/youtube-video-thickbox/">Supernatural Station website</a>.</p>
<p>“Thickbox” is a great way to showcase a youTube video on your web  site.  Thickbox’s light box effect gives videos a dramatic, theatre-like  feel. You only need to add a few extra lines of code to the preset  embed code supplied by YouTube.com to show your video inside a  “thickbox”. This method works with embed code from youTube.com as well  as embed code from other video hosting sites.</p>
<h4>Step-by-step Instructions to embed a youTube video inside a Thickbox:</h4>
<ul>
<li>
<h4>Step #1: Download and install jQuery.js and Thickbox 3.</h4>
<p>Download “jquery.js” from <a href="http://docs.jquery.com/Downloading_jQuery">jquery.com</a> and Thickbox3 files, “thickbox.js”, “thickbox.css”, “loadingAnimation.gif”, and “macFFhack.png”, from <a href="http://jquery.com/demo/thickbox/">jquery.com/demo/thickbox/</a>. You then need to upload these files to your web server’s root directory or a subdirectory.</p>
<p>You can skip this step, if “thickbox” came preinstalled with your CMS  or blog software, or if you installed a “thickbox” plugin on your site.  Please note that if your copy of “Thickbox” came from a gallery plugin,  some “thickbox” files may have been altered for that plugin. This can  lead to unexpected problems in Internet Explorer. I recommend you  install an unaltered copy of “thickbox” on your web server, if you  experience Thickbox problems in IE6 or IE7. Just make sure your version  of “thickbox” is placed last in the document head as shown in step #3  below.</li>
<li>
<h4>Step #2: Enter a valid DTD on the first line of your html document.</h4>
<p>Thickbox requires a valid document type definition (DTD) in the xhtml  document. Most CMS and blog software will automatically put this in for  you. However, if you are writing your document from scratch, then you  must include a DTD line above your opening &lt;html&gt; tag. If you  don’t know what DTD to add, the following code will work for most  documents:</p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;</p></blockquote>
<p>For a list of other DTD&#8217;s, visit <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">w3.org DTD recommendation</a> page.</li>
<li>
<h4>Step #3: Add “jquery.js” and “thickbox” to your document head.</h4>
<p>Enter the following lines between the &lt;head&gt; and &lt;/head&gt; tags in your xhtml document:</p>
<blockquote><p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;jquery.js&#8221;&gt;&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;thickbox/thickbox.js&#8221;&gt;&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt; var tb_pathToImage = &#8221;thickbox/loadingAnimation.gif&#8221;;&lt;/script&gt;<br />
&lt;style type=&#8221;text/css&#8221; media=&#8221;screen&#8221;&gt;@import “thickbox/thickbox.css&#8221;;&lt;/style&gt;</p></blockquote>
<p>In line #3, “loadingAnimation.gif” is a transition  graphic that is displayed before the thickbox appears. You can leave  this out, but it is helpful for your visitors to see it when thickbox is  slow to load.</p>
<p>You can skip this step if “Thickbox” came  preinstalled with your CMS/blog software or in a plugin and is  automatically included in the document head and you don’t want to  override those settings.</li>
<li>
<h4>Step #4: Add a unique, hidden &lt;div&gt; in your document body and paste the video embed code inside it.</h4>
<p>In the body of your web page, create a hidden div with a unique id  (id=&#8221;youtubeplayer20&#8243;) and paste the &#8220;embed&#8221; code from youtube.com  between the &lt;div&gt; and &lt;/div&gt; tags. To hide the div from the  viewer until they  click the link specified in step #5 below, add the  style attribute, “style=display:none;” to the opening &lt;div&gt; tag.</p>
<blockquote><p>&lt;div id=&#8221;youtubeplayer-20&#8243; style=&#8221;display:none;&#8221;&gt;<br />
&lt;!&#8211; start embed code copied directly from youTube.com &#8211;&gt; &lt;object width=&#8221;425&#8243; height=&#8221;355&#8243;&gt;<br />
&lt;param name=&#8221;movie&#8221; value=&#8221;http://www.youtube.com/v/YsowqYWs7vU&amp;hl=en&#8221;&gt;&lt;/param&gt;<br />
&lt;param name=&#8221;wmode&#8221; value=&#8221;transparent&#8221;&gt;&lt;/param&gt;<br />
&lt;embed src=&#8221;http://www.youtube.com/v/YsowqYWs7vU&amp;hl=en&#8221; type=&#8221;application/x-shockwave-flash&#8221; wmode=&#8221;transparent&#8221; width=&#8221;425&#8243; height=&#8221;355&#8243;&gt;&lt;/embed&gt; &lt;/object&gt;<br />
&lt;!&#8211; end embed code copied directly from youTube.com &#8211;&gt;<br />
&lt;/div&gt;</p></blockquote>
<p>Jot down the video dimensions shown in the “embed” code as you will need them in the next step.</p>
<p><strong>NOTE</strong>: Some video hosting sites already put their  embed code inside a div (ex. DailyMotion.com). I recommend manually  removing that div and any extraneous text inside it and place only the  remaining &lt;object&gt;, &lt;param&gt; and &lt;embed&gt; portion inside  your hidden &lt;div&gt;.</p>
<p><strong>6/27/2008 UPDATE</strong>:  A flash rendering problem on Mac  OSX/Firefox1.5+ and Mac OSX/Camino1.6 causes the youTube video to get  covered up by the thickbox itself. To fix, remove the  ‘wmode=”transparent”‘ argument from YouTube&#8217;s &lt;embed&gt; tag. Keep it  in the &lt;param&gt; tag only.</li>
<li>
<h4>Step #5: Lastly, in your document body, create an inline &#8220;thickbox&#8221;  link that points to the unique id of the hidden div containing the video  embed code.</h4>
<p>Create a Thickbox link for your youTube video by placing anchor tags  (&lt;a&gt;&lt;/a&gt;) around some text or an image. Use the thickbox  inline anchor, &#8220;#TB_inline&#8221; for the &#8220;href&#8221; and append the thickbox  dimensions (&gt;=video size) and the unique id of the hidden div from  step#4 as “href” parameters (see <a href="http://jquery.com/demo/thickbox/">thickbox inline content instructions</a>). The link must have a class of “thickbox” and an optional title that is displayed as the Thickbox header.</p>
<pre> &lt;a href="#TB_inline?height=380&amp;width=425&amp;inlineId=youtubeplayer20"
    title="My youTube Video"&gt;
Click here to see my youTube video&lt;/a&gt;</pre>
<p>If you don’t know your video dimensions, they are included inside the “embed” code from youTube.</li>
<li>
<h4>And that’s it!</h4>
<p>Here&#8217;s the entire code in a sample web page:</p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; dir=&#8221;ltr&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;js/jquery.js&#8221;&gt;&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;js/thickbox/thickbox.js&#8221;&gt;&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt; var tb_pathToImage = &#8221;thickbox/loadingAnimation.gif&#8221;;&lt;/script&gt;<br />
&lt;style type=&#8221;text/css&#8221; media=&#8221;screen&#8221;&gt;@import &#8220;js/thickbox/thickbox.css&#8221;;&lt;/style&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h2&gt;YouTube Video in a Thickbox example&lt;/h2&gt;<br />
&lt;div id=&#8221;youtubeplayer-20&#8243; style=&#8221;display:none;&#8221;&gt;<br />
&lt;!&#8211; start embed code copied directly from youTube.com &#8211;&gt;<br />
&lt;object width=&#8221;425&#8243; height=&#8221;355&#8243;&gt;<br />
&lt;param name=&#8221;movie&#8221; value=&#8221;http://www.youtube.com/v/YsowqYWs7vU&amp;hl=en&#8221;&gt;&lt;/param&gt;<br />
&lt;param name=&#8221;wmode&#8221; value=&#8221;transparent&#8221;&gt;&lt;/param&gt;<br />
&lt;embed src=&#8221;http://www.youtube.com/v/YsowqYWs7vU&amp;hl=en&#8221; type=&#8221;application/x-shockwave-flash&#8221; width=&#8221;425&#8243; height=&#8221;355&#8243;&gt;&lt;/embed&gt;<br />
&lt;/object&gt;<br />
&lt;!&#8211; end embed code copied directly from youTube.com &#8211;&gt;<br />
&lt;/div&gt;<br />
&lt;a href=&#8221;#TB_inline?height=365&amp;width=425&amp;inlineId=youtubeplayer-20&#8243;    title=&#8221;My YouTube Video&#8221;&gt;<br />
Click here to see my youTube video&lt;/a&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>This method works in FF 1.5, FF 2, Safari 1.3*, Safari 3, and IE 6. I  have not tested it in other browsers, but it should work fine in any  modern browser.</p>
<p>*<small>Note for Safari 1 users: although this Thickbox “inline” demo  works in Safari 1.3, other types of Thickbox 3 functions will not work  when combined with any version of jquery  greater than version 1.1.2,  and the combination, jquery 1.1.3+thickbox3 will cause Safari 1.3 to  crash.</small></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.techfromhel.com/2008/05/youtube-video-thickbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

