<?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; flv</title>
	<atom:link href="http://www.techfromhel.com/tag/flv/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>
	</channel>
</rss>

