Friday, September 4, 2009

Various Inline Media Players - Satay'ed

A while back, inspired by Drew McLellan's article in A List Apart regarding how to embed Flash-content, and still support W3.org's xhtml-standards (a.k.a.: "The Satay-method"), I decided back then to try and figure out, if one could do something similar with other embedded media-types, such as Windows Media Player, Realplayer and QuickTime.

Windows Media Player:
Get the m3u-playlist from: http://80.63.55.156/dwv/m3u/can_hiband.m3u


The Satay-code for Windows Media Player:
<object data="(Abslolute URL-path to a media-file)" height="66" id="playersize" type="application/x-mplayer2" width="320">
<param name="src" value="(Abslolute URL-path to a media-file)" />
<param name="enablecontextmenu" value="0" />
<param name="showpositioncontrols" value="1" />
<param name="showstatusbar" value="1" />
<param name="autostart" value="0" />
<param name="autoplay" value="0" />
Get the m3u-playlist from: <a href="(Abslolute URL-path to a media-file) title="Click to download...">(Abslolute URL-path to a media-file)</a>
</object>
 


QuickTime:
Get the m3u-playlist from: http://80.63.55.156/dwv/m3u/can.m3u

The Satay-code for QuickTime:
<object id="playersize" type="video/quicktime" data="(Abslolute URL-path to a media-file)" codetype="anything" height="20" width="320";>
<param name="src" value="(Abslolute URL-path to a media-file)" />
<param name="autoplay" value="false" />
<param name="controller" value="true" />
<param name="kioskmode" value="true" />
Get the m3u-playlist from:<br /><a href="(Abslolute URL-path to a media-file)" title="Click to download...">(Abslolute URL-path to a media-file)u</a>
</object>



RealPlayer:
Get the m3u-playlist from: http://80.63.55.156/dwv/m3u/can_hiband.m3u


The Satay-code for RealPlayer:
<object id="playersize" type="audio/x-pn-realaudio-plugin" data="(Abslolute URL-path to a media-file)" height="66" width="320">
<param name="controls" value="default" />
<param name="autostart" value="true" />
<param name="src" value="(Abslolute URL-path to a media-file)" />
Get the m3u-playlist from:<br /><a href="(Abslolute URL-path to a media-file)" title="Click to download...">(Abslolute URL-path to a media-file)</a>
</object>

Tuesday, April 24, 2007

The Satay-method and handling a missing SWF-plugin...

This might seem kind of trivial, but I've had a number of students, whom have asked me:

"The Satay-method doesn't code-wise take into account, if a client doesn't have the (necessary) SWF-plugin installed! What can you do about that?"

And they're right - even though Drew McLellan does actually mention a workaround for this in his excellent article about the Satay-method at:
http://www.alistapart.com/articles/flashsatay/
and in his posted article at:
http://www.adobe.com/devnet/dreamweaver/articles/flash_satay.html

by just including a "sacrificial movie" at the front of a site which has the codebase attribute; something which I'm not all that keen on, TBH...

I mean, why make an extra swf-file and add some extra html-coding, when it can all be done in one go?


So IMO, the simple answer to that one, is to put the following code in-between the LAST "param"-tag and the </object>-tag:

No Flash-content?<br/>: >>
<a href="http://www.adobe.com/shockwave/download/download.cgi? >>
P1_Prod_Version=ShockwaveFlash&promoid=BIOW"> >>
<img >> src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" >>
alt="Get the latest Flash-plugin from adobe.com..." /></a>


NOTE: The ">>" in the code above denotes line-breaks...

So remember when pasting the code above into your (x)html-document that it has to be in one long string, to avoid unintended line-breaks etc. ...