<?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>Blog - PonticStar.com &#187; Web Design</title>
	<atom:link href="http://www.ponticstar.com/blog/category/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ponticstar.com/blog</link>
	<description>Blog about various aspects of programming and web design</description>
	<lastBuildDate>Sun, 14 Aug 2011 23:52:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Yahoo Media Player beta version is available</title>
		<link>http://www.ponticstar.com/blog/2011/02/24/yahoo-media-player-beta/</link>
		<comments>http://www.ponticstar.com/blog/2011/02/24/yahoo-media-player-beta/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 15:17:18 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Yahoo! Media Player]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=138</guid>
		<description><![CDATA[It turns out that Yahoo Media Player is not abandoned project after all. Last week it was announced that beta version is available for testing at mediaplayer.yahoo.com/beta. Here is a note from developers: We&#8217;ve added some new stuff like video support. The player can now play YouTube videos and movie trailers – just add a [...]]]></description>
			<content:encoded><![CDATA[<p>It turns out that Yahoo Media Player is not abandoned project after all. Last week it was announced that beta version is available for testing at <a href="http://mediaplayer.yahoo.com/beta/">mediaplayer.yahoo.com/beta</a>. Here is a note from developers:</p>
<blockquote><p>
We&#8217;ve added some new stuff like video support. The player can now play YouTube videos and movie trailers – just add a YouTube link or Yahoo! Movie page link to your page. And, at long last, we&#8217;ve added a seek slider to control the position of the audio or video! That bug where songs were stopping instead of pausing when clicking pause has been fixed, as well as a bunch of other small bug fixes.
</p></blockquote>
<p>Here is the new code you will need to embed on your site to test this out (remove the other player JavaScript first):</p>
<pre>
&lt;script type="text/javascript" src="http://webplayer.yahooapis.com/player.js"&gt;&lt;/script&gt;
</pre>
<p><script type="text/javascript"> var YMPParams = { displaystate:-1 };</script><script type="text/javascript" src="http://webplayer.yahooapis.com/player.js"></script></p>
<p>Example:<br />
<a href="http://www.lakeoftears.net/sounds/LOT-FA08.mp3" title="Lake of Tears: Demon you / Lily Anne">Lake of Tears: Demon you / Lily Anne</a><br />
<a href="http://www.youtube.com/watch?v=ARDBGPVOcWk">Anime &#8220;Red thread&#8221;</a><br />
<a href="http://www.youtube.com/watch?v=YXMY2yvu4vk">Top 50 Songs of the 90s in under 9 Minutes</a> </p>
<p>This announcement was posted in Yahoo! discussion group at <a href="http://tech.groups.yahoo.com/group/yhoomediaplayer/">tech.groups.yahoo.com/group/yhoomediaplayer/</a>. Feel free to post examples of how you are using the player on your site to this group.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2011/02/24/yahoo-media-player-beta/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
<enclosure url="http://www.lakeoftears.net/sounds/LOT-FA08.mp3" length="1599740" type="audio/mpeg" />
		</item>
		<item>
		<title>Strange LetsTalk customer care icon metaphor</title>
		<link>http://www.ponticstar.com/blog/2010/03/11/letstalk-icon-metaphor/</link>
		<comments>http://www.ponticstar.com/blog/2010/03/11/letstalk-icon-metaphor/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 15:18:12 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[Seen Elsewhere]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=125</guid>
		<description><![CDATA[While looking to upgrade my phone on LetsTalk.com I was puzzled by their customer care icon. Have no idea what was designer thinking creating it. Maybe you can help? Another question I am asking myself is there a connection between this and their low rating at ResellerRatings.com.]]></description>
			<content:encoded><![CDATA[<p>While looking to upgrade my phone on <a class="target-blank" href="http://www.letstalk.com">LetsTalk.com</a> I was puzzled by their customer care icon. Have no idea what was designer thinking creating it. Maybe you can help?</p>
<div id="attachment_126" class="wp-caption aligncenter" style="width: 335px"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2010/03/letstalk_customer_care.gif" alt="" title="LetsTalk customer care icon" width="325" height="67" class="size-full wp-image-126" /><p class="wp-caption-text">LetsTalk customer care icon</p></div>
<p>Another question I am asking myself is there a connection between this and their low rating at <a class="target-blank" href="http://www.resellerratings.com/store/Let_s_Talk">ResellerRatings.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2010/03/11/letstalk-icon-metaphor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking the Yahoo! Media Player</title>
		<link>http://www.ponticstar.com/blog/2009/12/12/hacking-yahoo-media-player/</link>
		<comments>http://www.ponticstar.com/blog/2009/12/12/hacking-yahoo-media-player/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 06:00:00 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Yahoo! Media Player]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=109</guid>
		<description><![CDATA[The Yahoo! Media Player enhances your web site or blog by creating an embedded player for each audio link. All the links can be played with one click, turning the page into a playlist. This is done by adding just one line of code to your page. This article explains how to customize Yahoo! Media Player to match your web site design.]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE</strong>: On August 4, 2011 Yahoo! has released a new version of the player available at <a class="target-blank" href="http://webplayer.yahoo.com">webplayer.yahoo.com</a>. Please note that tricks mentioned here might not work with it. I will try to review the new player and update this article.</p>
<ul class="toc">
<li><a href="#about">About the player</a></li>
<li><a href="#updates">Updates</a></li>
<li><a href="#usage">How to use</a>
<ul>
<li><a href="#playlist">How to use a playlist</a></li>
</ul>
</li>
<li>Appearance
<ul>
<li><a href="#skin">How to change skin</a></li>
<li><a href="#bgcolor">How to adjust background color</a></li>
<li><a href="#color">How to adjust text color</a></li>
<li><a href="#relevant-info-update">How to update block with relevant information</a></li>
<li><a href="#relevant-info-hide">How to remove block with relevant information</a></li>
<li><a href="#buttons-hide">How to hide player buttons</a></li>
<li><a href="#playlist-color">How to change playlist colors</a></li>
<li><a href="#album-art">How to display album art</a></li>
<li><a href="#album-art-default">How to change default album art image</a></li>
<li><a href="#album-art-hide">How to hide album art</a></li>
<li><a href="#meta-album-title-change">How to change meta (album title/website URL) information</a></li>
<li><a href="#meta-album-title-hide">How to hide meta (album title/website URL) information</a></li>
<li><a href="#hide-player">How to hide the player</a></li>
<li><a href="#hide-links">How to hide MP3 links</a></li>
<li><a href="#hide-play-pause-buttons">How to hide link play/pause buttons</a></li>
</ul>
</li>
<li>Functionality
<ul>
<li><a href="#pop">How to start player in a new window</a></li>
<li><a href="#title-search-disable">How to disable Yahoo! search links</a></li>
<li><a href="#settings">How to change default settings</a></li>
</ul>
<li><a href="#links">Links</a></li>
</ul>
<p><a name="about"></a></p>
<h3>About the player</h3>
<p>The Yahoo! Media Player enhances your web site or blog by creating an embedded player for each audio link. All the links can be played with one click, turning the page into a playlist. This is done by adding just one line of code to your page.</p>
<p><a name="updates"></a></p>
<h3>Updates</h3>
<h4>2/15/2011 &#8211; Yahoo! Media Player beta version is released</h4>
<p>There is beta version available with YouTube/Yahoo! Movie pages support, please see <a href="http://mediaplayer.yahoo.com/beta/">Yahoo! Media Player beta page</a> or <a href="/blog/2011/02/24/yahoo-media-player-beta">this post</a> for more information. Please note that some hacks mentioned here might not work with beta version.</p>
<p><a name="usage"></a></p>
<h3>How to use</h3>
<p>Please visit the Yahoo! Media Player web site (<a class="target-blank" href="http://mediaplayer.yahoo.com/">http://mediaplayer.yahoo.com/</a>) for more information.</p>
<p><a name="playlist"></a></p>
<h3>How to use a playlist</h3>
<p>Please visit the Yahoo! Media Player public wiki (<a class="target-blank" href="http://yahoomediaplayer.wikia.com/wiki/How_to_link">http://yahoomediaplayer.wikia.com/wiki/How_to_link</a>) for more information.</p>
<p>Note that you will not be able to test the functionality on your local computer because Yahoo! Media Player uses external service to retrieve and process XSPF files. It was done to avoid cross-domain access limitation for Flash objects and JavaScript code.</p>
<p><a href="/projects/hacking-yahoo-media-player/playlist.html">View example</a></p>
<p><a name="skin"></a></p>
<h3>How to change skin</h3>
<p>
If you want to dramatically change appearance of the player you would need to modify its skin. There are three images that player mostly uses however you will need to download just the skin image to change player&#8217;s appearance:
</p>
<ol>
<li>
Skin image, links: <a class="target-blank" href="http://l.yimg.com/us.yimg.com/i/us/mus/ymwp/mediaplayer-2.0.31.png">Yahoo.com</a>, <a href="http://www.ponticstar.com/projects/hacking-yahoo-media-player/mediaplayer-2.0.31.png">PonticStar.com</a></li>
<li>
Animated image used when player is minimized and playing a song, links: <a  class="target-blank" href="http://l.yimg.com/us.yimg.com/i/us/mus/ymwp/mediaplayer-animarrow-2.0.31.gif">Yahoo.com</a>, <a href="http://www.ponticstar.com/projects/hacking-yahoo-media-player/mediaplayer-animarrow-2.0.31.gif">PonticStar.com</a>
</li>
<li>
Animated image used to locate audio link on the page, links: <a  class="target-blank" href="http://l.yimg.com/us.yimg.com/i/us/mus/ymwp/mediaplayer-findlink-2.0.31.gif">Yahoo.com</a>, <a href="http://www.ponticstar.com/projects/hacking-yahoo-media-player/mediaplayer-animarrow-2.0.31.gif">PonticStar.com</a>
</li>
</ol>
<p>Once you have downloaded the skin image, use your favorite image editing program to customize it. In order to apply the skin you would have to use the code below.</p>
<p>Instructions: Update path to your image file. Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Change default skin */
#ymp-player .ymp-color-main {
  background-color:transparent !important;
}

.ymp-skin {
  background-image:url(/path/to/your/mediaplayer-skin.png) !important;
}

/* Use original animated images */
#ymp-body #ymp-btn-max span.ymp-animarrow {
  background-image:url(http://l.yimg.com/us.yimg.com/i/us/mus/ymwp/mediaplayer-animarrow-2.0.31.gif) !important;
}
a.ymp-btn-page-target em.ymp-skin,
a:hover.ymp-btn-page-target em.ymp-skin,
a:active.ymp-btn-page-target em.ymp-skin {
  background-image:url(http://l.yimg.com/us.yimg.com/i/us/mus/ymwp/mediaplayer-findlink-2.0.31.gif)  !important;
}
</pre>
<p>If you want to use reduce loading time and avoid using two additional images, use the following code instead:</p>
<pre class="brush:css">
/* Yahoo! Media Player: Change default skin */
#ymp-player .ymp-color-main {
  background-color:transparent !important;
}

.ymp-skin {
  background-image:url(/path/to/your/mediaplayer-skin.png) !important;
}

/* Avoid using animated images (and reduce loading time) */
#ymp-body #ymp-btn-max span.ymp-animarrow {
  background-position:-119px -80px !important;
}
a.ymp-btn-page-target em.ymp-skin,
a:hover.ymp-btn-page-target em.ymp-skin,
a:active.ymp-btn-page-target em.ymp-skin {
  background-position:-624px -17px !important;
}
</pre>
<p><a href="/projects/hacking-yahoo-media-player/skin.html">View example</a></p>
<p><a name="bgcolor"></a></p>
<h3>How to adjust background color</h3>
<div id="attachment_110" class="wp-caption aligncenter" style="width: 540px"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig01.gif" alt="Figure 1: Background color" title="Yahoo! Media Player" width="530" height="93" class="size-full wp-image-110" /><p class="wp-caption-text">Figure 1: Background color</p></div>
<p>Instructions: Update color values. Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Set background color */
#ymp-player .ymp-color-main,
#ymp-tray .ymp-color-tray {
  background-color:#2F437C !important;
}
</pre>
<p><a href="/projects/hacking-yahoo-media-player/bgcolor.html">View example</a></p>
<p><a name="color"></a></p>
<h3>How to adjust text color</h3>
<p>Instructions: Update color values. Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Set text color */
#ymp-player .ymp-color-text-main {
  color:#000000 !important;
}
</pre>
<p><a name="relevant-info-update"></a></p>
<h3>How to update block with relevant information</h3>
<p>You may want to display your own message in the relevant information block instead of the default &#8220;learn more about this player&#8221; link. To do so you will need link to your media like this:</p>
<pre class="brush:html">
<a href="music.mp3">a song <span class="relevant-info">relevant info for this song</a></a>
</pre>
<p>Instructions: Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: */
/* Modify contents of the block with relevant information */
#ymp-relevant-info {
  display:block;
  position:absolute;
  left:2px;
  top:10px;
  width:116px;
  font-size:12px;
  font-weight:bold;
  line-height:13px;
  text-align:center;
  z-index:2;
} 

#ymp-relevant-info a {
  color:#3D9AD0;
}

.relevant-info {
  display:none;
}
</pre>
<p>Instructions: Insert the code below <i>right after</i> the line that embeds the player into your page.</p>
<pre class="brush:javascript">
&lt;script type="text/javascript"&gt;
   function apiReadyHandler(){
      YAHOO.ympyui.util.Event.onDOMReady(UpdateRelevantInfo);
      YAHOO.MediaPlayer.onTrackStart.subscribe(UpdateRelevantInfo);
   }

   /*
      Written by Jonathan Snook, http://www.snook.ca/jonathan
      Add-ons by Robert Nyman, http://www.robertnyman.com

http://robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/

   */
   function getElementsByClassName(className, tag, elm){
      var testClass = new RegExp("(^|\\s)" + className + "(\\s|$)");
      var tag = tag || "*";
      var elm = elm || document;
      var elements = (tag == "*" &#038;&#038; elm.all)
                        ? elm.all
                        : elm.getElementsByTagName(tag);
      var returnElements = [];
      var current;
      var length = elements.length;
      for(var i=0; i&lt;length; i++){
         current = elements[i];
         if(testClass.test(current.className)){
            returnElements.push(current);
         }
      }
      return returnElements;
   }

   function UpdateRelevantInfo() {
      // Default text
      var info = '<a href="http://www.ponticstar.com">Visit ponticstar.com for more information</a>';

      // Retrieve information about the track
      var meta = YAHOO.MediaPlayer.getMetaData();

      // If element with class "relevant-info" is available
      // inside the anchor, use its content instead
      if(meta &#038;&#038; meta.anchor){
         var el = meta.anchor;
         var a = (el.getElementsByClassName)
                    ? el.getElementsByClassName("relevant-info")
                    : getElementsByClassName("relevant-info", null, el);
         if(a.length > 0){ info = a[0].innerHTML; }
      }

      document.getElementById('ymp-relevance').innerHTML = '
<div id="ymp-relevant-info">' + info + '</div>

';
   }

   YAHOO.MediaPlayer.onAPIReady.subscribe(apiReadyHandler);
&lt;/script&gt;
</pre>
<p><a href="/projects/hacking-yahoo-media-player/relevant-info-update.html">View example</a></p>
<p><a name="relevant-info-hide"></a></p>
<h3>How to remove block with relevant information</h3>
<div id="attachment_111" class="wp-caption aligncenter" style="width: 540px"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig02.gif" alt="Figure 2: Relevant information block is removed" title="Yahoo! Media Player" width="530" height="93" class="size-full wp-image-111" /><p class="wp-caption-text">Figure 2: Relevant information block is removed</p></div>
<p>Player displays &#8220;Learn more about this player&#8221; link along with lyrics or related videos. If you are trying to minimize size of the player, use the code below.</p>
<p>Instructions: Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: */
/* Remove block with relevant information */
#ymp-relevance { display:none !important; }
.ymp-player-max #ymp-body { width:570px !important; }
.ymp-player-max #ymp-body #ymp-body-strip { width:557px !important; }
.ymp-player-max #ymp-body #ymp-body-base  { width:560px !important; }
</pre>
<p><a href="/projects/hacking-yahoo-media-player/relevant-info-hide.html">View example</a></p>
<p><a name="buttons-hide"></a></p>
<h3>How to hide various buttons</h3>
<p>Instructions: Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Hide 'close window' button */
#ymp-btn-close { display:none !important; }

/* Yahoo! Media Player: Hide 'pop-up window' button */
#ymp-btn-pop { display:none !important; }
</pre>
<p><a href="/projects/hacking-yahoo-media-player/buttons-hide.html">View example</a></p>
<p><a name="playlist-color"></a></p>
<h3>How to change playlist colors</h3>
<div id="attachment_112" class="wp-caption aligncenter" style="width: 540px"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig03.gif" alt="Figure 3: Playlist colors" title="Yahoo! Media Player" width="530" height="277" class="size-full wp-image-112" /><p class="wp-caption-text">Figure 3: Playlist colors</p></div>
<p>Instructions: Update color values. Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Playlist colors */
/* Default color for playlist entries */
#ymp-tray .ymp-tray-track {
  color:#FFCE0C !important;
}

/* Highlighted track */
#ymp-tray .ymp-tray-track:hover {
  color:#FFFFFF !important;
  background-color:transparent !important;
}

/* Currently playing track */
#ymp-tray .ymp-tray-track.playing,
#ymp-tray .ymp-tray-track.playing:hover {
  color:#FFFFFF !important;
  background-color:#777777 !important;
}
</pre>
<p><a name="album-art"></a></p>
<h3>How to display album art</h3>
<div id="attachment_113" class="wp-caption aligncenter" style="width: 540px"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig04.gif" alt="Figure 4: Album art" title="Yahoo! Media Player" width="530" height="93" class="size-full wp-image-113" /><p class="wp-caption-text">Figure 4: Album art</p></div>
<p>You can set the image which is displayed in the player during a song. To do this, put an <code>img</code> element within the playable link.</p>
<p>For example:</p>
<pre class="brush:html">
&lt;a href="example.mp3"&gt;&lt;img src="example.png" alt="" /&gt;my song&lt;/a&gt;
</pre>
<p>The dimensions of the image should be square, not rectangular. If you don&#8217;t want the image to show up directly in the main web page, add <code>style="display:none"</code> to your <code>img</code> tag:</p>
<pre class="brush:html">
&lt;a href="example.mp3"&gt;&lt;img src="example.png" alt="" style="display:none" /&gt;my song&lt;/a&gt;
</pre>
<p>Source: <a class="target-blank" href="http://yahoomediaplayer.wikia.com/wiki/How_to_link#Album_Art">http://yahoomediaplayer.wikia.com/wiki/How_to_link#Album_Art</a></p>
<p><a href="/projects/hacking-yahoo-media-player/album-art.html">View example</a></p>
<p><a name="album-art-default"></a></p>
<h3>How to change default album art image</h3>
<p>Insert the code below just <i>before the line</i> that embeds the player into your page.</p>
<pre class="brush:javascript">
<!-- Yahoo! Media Player configuration -->
&lt;script type="text/javascript"&gt;
var YMPParams =
{
   defaultalbumart:'http://somedomain.com/path/someimage.gif'
};
&lt;/script&gt;
</pre>
<p>Source: <a class="target-blank" href="http://mediaplayer.yahoo.com/api/#param_defaultalbumart">http://mediaplayer.yahoo.com/api/#param_defaultalbumart</a></p>
<p><a name="album-art-hide"></a></p>
<h3>How to hide album art</h3>
<div id="attachment_114" class="wp-caption aligncenter" style="width: 540px"><img src="http://www.ponticstar.com/blog/wp-content/uploads/2009/12/hacking_ymp_fig05.gif" alt="Figure 5: Hidden album art" title="Yahoo! Media Player" width="530" height="93" class="size-full wp-image-114" /><p class="wp-caption-text">Figure 5: Hidden album art</p></div>
<pre class="brush:css">
/* Yahoo! Media Player: Hide album art */
#ymp-meta-image { display:none !important; }
#ymp-body #ymp-meta-top,
#ymp-body #ymp-meta-bottom {
  left:8px !important;
  width:330px !important;
}
</pre>
<p><a href="/projects/hacking-yahoo-media-player/album-art-hide.html">View example</a></p>
<p><a name="meta-album-title-change"></a></p>
<h3>How to change meta (album title/web site URL) information</h3>
<p>Instructions: Insert the code below <i>right after</i> the line that embeds the player into your page.</p>
<pre class="brush:javascript">
&lt;script type="text/javascript"&gt;
   function apiReadyHandler(){
      YAHOO.ympyui.util.Event.onDOMReady(UpdateAlbumTitle);
      YAHOO.MediaPlayer.onTrackStart.subscribe(UpdateAlbumTitle);
   }

   /*
      Written by Jonathan Snook, http://www.snook.ca/jonathan
      Add-ons by Robert Nyman, http://www.robertnyman.com

http://robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/

   */
   function getElementsByClassName(className, tag, elm){
      var testClass = new RegExp("(^|\\s)" + className + "(\\s|$)");
      var tag = tag || "*";
      var elm = elm || document;
      var elements = (tag == "*" &#038;&#038; elm.all)
                        ? elm.all
                        : elm.getElementsByTagName(tag);
      var returnElements = [];
      var current;
      var length = elements.length;
      for(var i=0; i&lt;length; i++){
         current = elements[i];
         if(testClass.test(current.className)){
            returnElements.push(current);
         }
      }
      return returnElements;
   }

   function UpdateAlbumTitle() {
      var meta_bottom = document.getElementById('ymp-meta-bottom');
      var el = getElementsByClassName('ymp-meta-box', 'div', meta_bottom);
      if(el.length &gt; 0){
         el[0].innerHTML = 'Visit <a href="http://www.lakeoftears.net" target="_blank" class="ymp-color-text-main">www.lakeoftears.net</a> for more info';
      }
   }

   YAHOO.MediaPlayer.onAPIReady.subscribe(apiReadyHandler);
&lt;/script&gt;
</pre>
<p><a href="/projects/hacking-yahoo-media-player/meta-album-title-change.html">View example</a></p>
<p><a name="meta-album-title-hide"></a></p>
<h3>How to hide meta (album title/web site URL) information</h3>
<p>Instructions: Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Hide album title / web site URL */
#ymp-meta-album-title { display:none !important; }
</pre>
<p><a href="/projects/hacking-yahoo-media-player/meta-album-title-hide.html">View example</a></p>
<p><a name="hide-player"></a></p>
<h3>How to hide the player</h3>
<p>Sometimes you may want to display only small play button next to MP3 links. To hide the player use the code below.</p>
<p>Instructions: Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Hide player */
#ymp-player,
#ymp-tray,
#ymp-error-bubble,
#ymp-secret-bubble {
  display:none !important;
}
</pre>
<p>There is another way to do it using parameter <code>displaystate</code> which is described at <a class="target-blank" href="http://mediaplayer.yahoo.com/api/#param_displaystate">http://mediaplayer.yahoo.com/api/#param_displaystate</a></p>
<p><a href="/projects/hacking-yahoo-media-player/hide-player.html">View example</a></p>
<p><a name="hide-links"></a></p>
<h3>How to hide MP3 links</h3>
<p>Instructions: Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Hide MP3 links */
.ymp-btn-page-play,
.ymp-btn-page-pause {
  display:none;
}
</pre>
<p><a name="hide-play-pause-buttons"></a></p>
<h3>How to hide link play/pause buttons</h3>
<p>Instructions: Append the following lines to CSS file or include them into HTML page somewhere in between <code>&lt;head&gt;</code> and <code>&lt;/head&gt;</code> tags enclosing the block with tags <code>&lt;style type="text/css"&gt;</code> and <code>&lt;/style&gt;</code>.</p>
<pre class="brush:css">
/* Yahoo! Media Player: Hide play/pause button */
a.ymp-btn-page-play,
a.ymp-btn-page-pause {
  margin-left:-20px !important;
}

a.ymp-btn-page-play em.ymp-skin,
a.ymp-btn-page-pause em.ymp-skin {
  display: none !important;
}
</pre>
<p><a href="/projects/hacking-yahoo-media-player/play-pause-buttons-hide.html">View example</a></p>
<p><a name="pop"></a></p>
<h3>How to start player in a new window</h3>
<p>The code below tries to launch player in a new window automatically which allows user to navigate your site without interrupting the player. However my code for displaying pop-under window doesn&#8217;t work as expected for all browsers which results in pop-up window instead.</p>
<p>Instructions: Insert the code below right <i>after the line</i> that embeds the player into your page.</p>
<pre class="brush:javascript">
&lt;script type="text/javascript"&gt;
    var ymp_pop_num_tries = 0;
    var ymp_pop_max_num_tries = 20;
    function ympPopPlayer(){
       var ymp = YAHOO.mediaplayer;
       if(ymp_pop_num_tries > ymp_pop_max_num_tries){ return; }
       if(ymp.Controller &#038;&#038; ymp.Controller.view){
          // Create a pop-under window
          // works in IE, doesn't work in Firefox 3.5.x
          var ymp_pop = window.open("", "ymediaplayer");
          if(ymp_pop){ ymp_pop.blur(); }
          window.focus();

          ymp.Controller.view.popPlayer({});
       } else {
         ymp_pop_num_tries++;
         setTimeout(ympPopPlayer, 1000);
       }
    }

    function apiReadyHandler(){
       ympPopPlayer();
    }

    YAHOO.MediaPlayer.onAPIReady.subscribe(apiReadyHandler);
&lt;/script&gt;
</pre>
<p><a href="/projects/hacking-yahoo-media-player/pop.html">View example</a></p>
<p><a name="title-search-disable"></a></p>
<h3>How to disable Yahoo! search links</h3>
<p>Instructions: Insert the code below right <i>after the line</i> that embeds the player into your page.</p>
<pre class="brush:javascript">
&lt;script type="text/javascript"&gt;
   // Disable Yahoo! Media Player search links
   function apiReadyHandler(){
      YAHOO.MediaPlayer.onMediaUpdate.subscribe(DisableYahooLinks);
      YAHOO.MediaPlayer.onTrackStart.subscribe(DisableYahooLinks);
      setTimeout(DisableYahooLinks, 2000);
   }

   function DisableYahooLinks(){
      DisableLink(document.getElementById('ymp-meta-track-title'));
      DisableLink(document.getElementById('ymp-meta-artist-title'));
      DisableLink(document.getElementById('ymp-meta-image'));
      DisableLink(document.getElementById('ymp-meta-album-title'));
   }

   function DisableLink(el){
      if(el){
         el.href = 'javascript:void(0)';
         el.onclick = function(){ return false; };
      }
   }

   YAHOO.MediaPlayer.onAPIReady.subscribe(apiReadyHandler);
&lt;/script&gt;
</pre>
<p><a href="/projects/hacking-yahoo-media-player/title-search-disable.html">View example</a></p>
<p><a name="settings"></a></p>
<h3>How to change default settings</h3>
<p>See <a class="target-blank" href="http://mediaplayer.yahoo.com/api">http://mediaplayer.yahoo.com/api</a> for more information.</p>
<p><a name="links"></a></p>
<h3>Links</h3>
<ul>
<li><a class="target-blank" href="http://mediaplayer.yahoo.com/">Yahoo! Media Player official page</a></li>
<li><a class="target-blank" href="http://tech.groups.yahoo.com/group/yhoomediaplayer/">Discussion group at Yahoo! Groups</a></li>
<li><a class="target-blank" href="http://mediaplayer.yahoo.com/api/">Yahoo! Media Player API</a></li>
<li><a class="target-blank" href="http://yahoomediaplayer.wikia.com/">Yahoo! Media Player public Wiki</a></li>
<li><a class="target-blank" href="http://ymusicblog.com/blog/category/player/">Yahoo! Music Blog</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/12/12/hacking-yahoo-media-player/feed/</wfw:commentRss>
		<slash:comments>134</slash:comments>
		</item>
		<item>
		<title>Compressed Nifty Corners</title>
		<link>http://www.ponticstar.com/blog/2009/01/16/compressed-niftycorners/</link>
		<comments>http://www.ponticstar.com/blog/2009/01/16/compressed-niftycorners/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 00:08:38 +0000</pubDate>
		<dc:creator>Michael Ryvkin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.ponticstar.com/blog/?p=26</guid>
		<description><![CDATA[Recently I was experimenting with different techniques and libraries that implement rounded corners with no images. Nifty Corners Cube by Alessandro Fulciniti was among them. I liked the fact that the library detected background color and padding of the target element. This allows the technique to degrade gracefully if JavaScript is disabled. As a rule [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was experimenting with different techniques and libraries that implement rounded corners with no images. <a title="Nifty Corners Cube" href="http://www.html.it/articoli/niftycube/" target="_blank">Nifty Corners Cube</a> by <em>Alessandro Fulciniti</em> was among them.</p>
<p>I liked the fact that the library detected background color and padding of the target element. This allows the technique to degrade gracefully if JavaScript is disabled.</p>
<p>As a rule of thumb I usually compress the libraries I use with <a title="JavaScript packer" href="http://dean.edwards.name/download/#packer" target="_blank">JavaScript packer</a> written by <em>Dean Edwards</em> and <em>Rob Seiler</em>. However <em>niftycube.js</em> had to be corrected before since there is a semicolon missing on line <strong>24</strong>.</p>
<div class="filename">niftycube.js:</div>
<pre class="brush:js">String.prototype.find=function(what){
return(this.indexOf(what)>=0 ? true : false);
}; // Missing semicolon
</pre>
<p><a href='http://www.ponticstar.com/blog/wp-content/uploads/2009/01/niftycube-min.js'>Download Nifty Corners Cube (compressed)</a>, 4.66 KB.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponticstar.com/blog/2009/01/16/compressed-niftycorners/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

