Bill Thompson
posted this on Aug-02 2011 12:53
Adding "playMedia" to the flashvars of a widget code allows all songs being offered to also be played directly from the widget, just like the streaming player. Note: The Email for Media widget must be set up to show a slideshow or display image for this to work, because a play button will surface on top of this play area. This allows fans to sample before downloading. There's no play controls with this function (volume, shuffle, etc) so keep that in mind.
Here's a link to a sample Email For Media widget with working play button:
http://basecampmusic.com/theyearofcomichypotheticals.html
To make this function work, you must do the following:
a. The widget must be greater than 300px to properly show the play button
b. The Email for Media offer must include at least one audio track
c. You must add the "playMedia" to the end of the flashvars section of the widget code like this:
Here's the code for this widget with the Play attribute added to the end of the code.
<div align="center">
<object type="application/x-shockwave-flash" height="380" width="478" id="TSWidget11843" data="http://cdn.topspin.net/widgets/email2/swf/TSEmailMediaWidget.swf?ti..." bgColor="#000000">
<param value="always" name="allowScriptAccess" />
<param name="allowfullscreen" value="true" />
<param name="quality" value="high" />
<param name="movie" value="http://cdn.topspin.net/widgets/email2/swf/TSEmailMediaWidget.swf?ti..." />
<param name="flashvars" value="widget_id=http://cdn.topspin.net/api/v1/artist/49/email_for_media/11843?times..." /></object>
</div>
Note the way this code: &playMedia=true has been added to the end of the last <param> in the code above. You must add this same bit of code to the end of your widget as well.