<?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>Sandwiches and Apples &#187; firefox</title>
	<atom:link href="http://www.sandwichesandapples.org/tag/firefox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sandwichesandapples.org</link>
	<description>Levis. Converse. White T-Shirts. Black Hoodies. Power Chords.</description>
	<lastBuildDate>Tue, 06 Apr 2010 20:04:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>YouTube troubles in Firefox</title>
		<link>http://www.sandwichesandapples.org/2008/06/24/youtube-troubles-in-firefox/</link>
		<comments>http://www.sandwichesandapples.org/2008/06/24/youtube-troubles-in-firefox/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 17:58:12 +0000</pubDate>
		<dc:creator>sandwiches and apples</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://todd-a.com/?p=1929</guid>
		<description><![CDATA[I was hired recently (does it count as being hired if you&#8217;re never paid?) to troubleshoot a bug with videos not appearing in Firefox.  The situation was this: a client was using the hack described by Justin Tadlock here to add YouTube videos to the sidebar of his WordPress blog.  The hack uses [...]]]></description>
			<content:encoded><![CDATA[<p>I was hired recently (does it count as being hired if you&#8217;re never paid?) to troubleshoot a bug with videos not appearing in Firefox.  The situation was this: a client was using the hack described by <a href="http://justintadlock.com/archives/2008/01/25/how-to-add-videos-to-your-wordpress-sidebar">Justin Tadlock here</a> to add YouTube videos to the sidebar of his WordPress blog.  The hack uses WordPress&#8217;s &#8220;custom field&#8221; to create a video category and display the video in the sidebar with a smaller than standard width.  <span id="more-1504"></span></p>
<p>The hack makes including video very simple.  You make a custom field called &#8220;Video&#8221; and drop in the YouTube URL, <em>not</em> the embed code.  Justin&#8217;s hack then queries the WP database for Video entries and then writes valid XHTML to display the YouTube embed:</p>
<blockquote><p>
&lt;div class=&#8221;v&lt;?php echo $i; ?&gt; video&#8221;&gt;<br />
&lt;?php<br />
// Check to see if custom field &#8220;Video&#8221; is set and if it has anything in the &#8220;Value&#8221; field.<br />
	if(isset($video[0]) &#038;&#038; strcmp($video[0],”)!= 0)  {</p>
<p>// Display valid XHTML player for YouTube, Google, MetaCafe, and other video sites<br />
// “echo $video[0];” displays the first item in the array for the custom field “Video”<br />
?&gt;</p>
<p>&lt;object type=”application/x-shockwave-flash” data=”&lt;?php echo $video[0]; ?&gt;” style=”width: 290px; height: 242px; border: none; padding: 0; margin: 0;” id=”video-block-&lt;?php echo $i; ?&gt;”&gt;<br />
	&lt;param name=”movie” value=”&lt;?php echo $video[0]; ?&gt;” /&gt;<br />
	&lt;param name=’wmode’ value=’transparent’ /&gt;<br />
	&lt;param name=”quality” value=”best” /&gt;<br />
	&lt;param name=”bgcolor” value=”transparent” /&gt;<br />
	&lt;param name=”FlashVars” value=”playerMode=embedded” /&gt;<br />
&lt;/object&gt;</p>
<p>&lt;?php<br />
	} // endif</p>
<p>// If there is no Value for the custom field Key &#8220;Video&#8221;<br />
else {</p>
<p>// echo error checking to check custom field errors<br />
	echo &#8216;Did not add a video URL to the custom field &lt;strong&gt; Key&lt;/strong&gt; of &#8220;Video&#8221;&#8216;;<br />
	echo &#8216;&lt;!&#8211; This user did not add the video URL to the correct custom field &#8211;&gt;&#8217;;</p>
<p>	} // endelse<br />
?&gt;<br />
&lt;/div&gt; &lt;!&#8211; video &#8211;&gt;<br />
&lt;?php endwhile; ?&gt;
</p></blockquote>
<p>Then he styles the output:</p>
<blockquote><p>
.video {<br />
	display: block;<br />
	float: left;<br />
	overflow: hidden;<br />
	width: 288px;<br />
	margin: 0 0 10px 0;<br />
	padding: 2px 5px 10px 5px;<br />
	text-align: center;<br />
	}<br />
.video div {<br />
	overflow: hidden;<br />
	margin: 0 auto;<br />
	padding: 0;<br />
	text-align: center;<br />
	display: block;<br />
	}<br />
object { padding: 0; margin: 0; }
</p></blockquote>
<p>The goofy thing was that the YouTube embeds appeared fine in IE but not in Firefox.  After some troubleshooting, I fixed the problem and reported to my client:</p>
<blockquote><p>
You should be good to go.  This is a very weird case of code standards failing in Firefox.  Although surely that can&#8217;t be the case.  I&#8217;m blaming YouTube officially.</p>
<p>To fix it, I stripped the code that Justin did which was the acceptable structure and replaced it with the good old dumb youtube suggested embed.  Here&#8217;s the section of code.  You only need the bit between the &lt;object&gt; tags.  Delete the entire &lt;object&gt; section that Justin used in his template.</p>
<p>&lt;h3&gt;On Video&lt;/h3&gt;<br />
   &lt;div class=&#8221;v&lt;?php echo $i; ?&gt; video&#8221;&gt;<br />
   &lt;?php<br />
   // Check to see if custom field &#8220;Video&#8221; is set and if it has<br />
anything in the &#8220;Value&#8221; field.<br />
       if(isset($video[0]) &#038;&#038; strcmp($video[0],&#8221;)!= 0)  {<br />
   // Display valid XHTML player for YouTube, Google, MetaCafe, and<br />
other video sites<br />
   // &#8220;echo $video[0];&#8221; displays the first item in the array for the<br />
custom field &#8220;Video&#8221;<br />
   ?&gt;</p>
<p>       &lt;object width=&#8221;222&#8243; height=&#8221;186&#8243;&gt;&lt;param name=&#8221;movie&#8221;<br />
value=&#8221;&lt;?php echo $video[0]; ?&gt;&#8221;&gt;&lt;/param&gt;&lt;param name=&#8221;wmode&#8221;<br />
value=&#8221;transparent&#8221;&gt;&lt;/param&gt;&lt;embed src=&#8221;&lt;?php echo $video[0]; ?&gt;&#8221;<br />
type=&#8221;application/x-shockwave-flash&#8221; wmode=&#8221;transparent&#8221; width=&#8221;222&#8243;<br />
height=&#8221;186&#8243;&gt;&lt;/embed&gt;&lt;/object&gt;
</p></blockquote>
<p>I&#8217;ve since heard from one other source that YouTube embeds are glitchy in Firefox.  I don&#8217;t have any first-hand experience with this since I watch YouTube video embeds every single day in Firefox.  But if anyone&#8217;s got info in this phenomenon, I&#8217;d be interested to hear it.</p>
<p>I have noticed that the add-on <a href="https://addons.mozilla.org/en-US/firefox/addon/1865">AdBlock Plus</a> sometimes makes Flash video invisible to me until I scroll up enough to move their &#8220;block&#8221; tab off the screen.  But this is a bug with AdBlock Plus not Firefox.  I can always disable ABP to view all Flash with no problems.</p>



Share this post:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F24%2Fyoutube-troubles-in-firefox%2F&amp;title=YouTube%20troubles%20in%20Firefox&amp;bodytext=I%20was%20hired%20recently%20%28does%20it%20count%20as%20being%20hired%20if%20you%27re%20never%20paid%3F%29%20to%20troubleshoot%20a%20bug%20with%20videos%20not%20appearing%20in%20Firefox.%20%20The%20situation%20was%20this%3A%20a%20client%20was%20using%20the%20hack%20described%20by%20Justin%20Tadlock%20here%20to%20add%20YouTube%20videos%20to%20the%20s" title="Digg"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F24%2Fyoutube-troubles-in-firefox%2F&amp;title=YouTube%20troubles%20in%20Firefox&amp;notes=I%20was%20hired%20recently%20%28does%20it%20count%20as%20being%20hired%20if%20you%27re%20never%20paid%3F%29%20to%20troubleshoot%20a%20bug%20with%20videos%20not%20appearing%20in%20Firefox.%20%20The%20situation%20was%20this%3A%20a%20client%20was%20using%20the%20hack%20described%20by%20Justin%20Tadlock%20here%20to%20add%20YouTube%20videos%20to%20the%20s" title="del.icio.us"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F24%2Fyoutube-troubles-in-firefox%2F&amp;t=YouTube%20troubles%20in%20Firefox" title="Facebook"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F24%2Fyoutube-troubles-in-firefox%2F&amp;title=YouTube%20troubles%20in%20Firefox" title="Reddit"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F24%2Fyoutube-troubles-in-firefox%2F&amp;title=YouTube%20troubles%20in%20Firefox" title="StumbleUpon"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F24%2Fyoutube-troubles-in-firefox%2F" title="Technorati"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=YouTube%20troubles%20in%20Firefox&amp;url=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F24%2Fyoutube-troubles-in-firefox%2F" title="Netvibes"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://posterous.com/share?linkto=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F24%2Fyoutube-troubles-in-firefox%2F&amp;title=YouTube%20troubles%20in%20Firefox&amp;selection=I%20was%20hired%20recently%20%28does%20it%20count%20as%20being%20hired%20if%20you%27re%20never%20paid%3F%29%20to%20troubleshoot%20a%20bug%20with%20videos%20not%20appearing%20in%20Firefox.%20%20The%20situation%20was%20this%3A%20a%20client%20was%20using%20the%20hack%20described%20by%20Justin%20Tadlock%20here%20to%20add%20YouTube%20videos%20to%20the%20s" title="Posterous"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/posterous.png" title="Posterous" alt="Posterous" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F24%2Fyoutube-troubles-in-firefox%2F&amp;t=YouTube%20troubles%20in%20Firefox&amp;s=I%20was%20hired%20recently%20%28does%20it%20count%20as%20being%20hired%20if%20you%27re%20never%20paid%3F%29%20to%20troubleshoot%20a%20bug%20with%20videos%20not%20appearing%20in%20Firefox.%20%20The%20situation%20was%20this%3A%20a%20client%20was%20using%20the%20hack%20described%20by%20Justin%20Tadlock%20here%20to%20add%20YouTube%20videos%20to%20the%20s" title="Tumblr"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=YouTube%20troubles%20in%20Firefox%20-%20http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F24%2Fyoutube-troubles-in-firefox%2F" title="Twitter"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=YouTube%20troubles%20in%20Firefox&amp;body=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F24%2Fyoutube-troubles-in-firefox%2F" title="email"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.sandwichesandapples.org/2008/06/24/youtube-troubles-in-firefox/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>download the un-downloadable</title>
		<link>http://www.sandwichesandapples.org/2008/06/23/download-the-un-downloadable/</link>
		<comments>http://www.sandwichesandapples.org/2008/06/23/download-the-un-downloadable/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 19:51:43 +0000</pubDate>
		<dc:creator>sandwiches and apples</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[how-to]]></category>

		<guid isPermaLink="false">http://todd-a.com/?p=1917</guid>
		<description><![CDATA[Sometimes a body might want to download a Flash Video .flv file (like a YouTube video) for playback later.  Or an .mp3 file that&#8217;s embedded in a Flash Player (like the mp3s played in MySpace audio players; even when the MySpacer has &#8220;not enabled downloading&#8221;).  A Firefox Add-On called Video Download Helper will [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes a body might want to download a Flash Video .flv file (like a YouTube video) for playback later.  Or an .mp3 file that&#8217;s embedded in a Flash Player (like the mp3s played in MySpace audio players; even when the MySpacer has &#8220;not enabled downloading&#8221;).  A <a href="http://spreadfirefox.com">Firefox</a> <a href="http://addons.mozilla.com">Add-On</a> called <a href="https://addons.mozilla.org/en-US/firefox/addon/3006">Video Download Helper</a> will grab these media files embedded on pages.</p>
<p><a href='http://www.sandwichesandapples.org/wp-content/uploads/2008/06/download-helper-button.png'><img src="http://www.sandwichesandapples.org/wp-content/uploads/2008/06/download-helper-button.png" alt="" title="download-helper-button" width="170" height="32" class="alignright size-medium wp-image-1919" /></a>The Add-On places a small button between your Address Bar and Search Bar.  When there is download-eligible media on a page it is colored-in and moving.  Click the little arrow next to the Download Helper button to select what media on the page that you&#8217;d like to download.  It will add the media to the standard Firefox download queue.</p>
<p>Incidentally, the Violent Femmes recently released a version of Gnarls Barkley&#8217;s &#8220;Crazy&#8221; <a href="http://www.myspace.com/violentandcrazy">via MySpace</a>.</p>



Share this post:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F23%2Fdownload-the-un-downloadable%2F&amp;title=download%20the%20un-downloadable&amp;bodytext=Sometimes%20a%20body%20might%20want%20to%20download%20a%20Flash%20Video%20.flv%20file%20%28like%20a%20YouTube%20video%29%20for%20playback%20later.%20%20Or%20an%20.mp3%20file%20that%27s%20embedded%20in%20a%20Flash%20Player%20%28like%20the%20mp3s%20played%20in%20MySpace%20audio%20players%3B%20even%20when%20the%20MySpacer%20has%20%22not%20enabled%20down" title="Digg"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F23%2Fdownload-the-un-downloadable%2F&amp;title=download%20the%20un-downloadable&amp;notes=Sometimes%20a%20body%20might%20want%20to%20download%20a%20Flash%20Video%20.flv%20file%20%28like%20a%20YouTube%20video%29%20for%20playback%20later.%20%20Or%20an%20.mp3%20file%20that%27s%20embedded%20in%20a%20Flash%20Player%20%28like%20the%20mp3s%20played%20in%20MySpace%20audio%20players%3B%20even%20when%20the%20MySpacer%20has%20%22not%20enabled%20down" title="del.icio.us"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F23%2Fdownload-the-un-downloadable%2F&amp;t=download%20the%20un-downloadable" title="Facebook"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F23%2Fdownload-the-un-downloadable%2F&amp;title=download%20the%20un-downloadable" title="Reddit"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F23%2Fdownload-the-un-downloadable%2F&amp;title=download%20the%20un-downloadable" title="StumbleUpon"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F23%2Fdownload-the-un-downloadable%2F" title="Technorati"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=download%20the%20un-downloadable&amp;url=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F23%2Fdownload-the-un-downloadable%2F" title="Netvibes"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://posterous.com/share?linkto=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F23%2Fdownload-the-un-downloadable%2F&amp;title=download%20the%20un-downloadable&amp;selection=Sometimes%20a%20body%20might%20want%20to%20download%20a%20Flash%20Video%20.flv%20file%20%28like%20a%20YouTube%20video%29%20for%20playback%20later.%20%20Or%20an%20.mp3%20file%20that%27s%20embedded%20in%20a%20Flash%20Player%20%28like%20the%20mp3s%20played%20in%20MySpace%20audio%20players%3B%20even%20when%20the%20MySpacer%20has%20%22not%20enabled%20down" title="Posterous"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/posterous.png" title="Posterous" alt="Posterous" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F23%2Fdownload-the-un-downloadable%2F&amp;t=download%20the%20un-downloadable&amp;s=Sometimes%20a%20body%20might%20want%20to%20download%20a%20Flash%20Video%20.flv%20file%20%28like%20a%20YouTube%20video%29%20for%20playback%20later.%20%20Or%20an%20.mp3%20file%20that%27s%20embedded%20in%20a%20Flash%20Player%20%28like%20the%20mp3s%20played%20in%20MySpace%20audio%20players%3B%20even%20when%20the%20MySpacer%20has%20%22not%20enabled%20down" title="Tumblr"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=download%20the%20un-downloadable%20-%20http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F23%2Fdownload-the-un-downloadable%2F" title="Twitter"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=download%20the%20un-downloadable&amp;body=http%3A%2F%2Fwww.sandwichesandapples.org%2F2008%2F06%2F23%2Fdownload-the-un-downloadable%2F" title="email"><img src="http://www.sandwichesandapples.org/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.sandwichesandapples.org/2008/06/23/download-the-un-downloadable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
