Link to home
Start Free TrialLog in
Avatar of john-formby
john-formbyFlag for Ghana

asked on

Detect Media Player Version and Use

Hi,

I have just updated a media player object and made it cross browser compatible for a friends website, but she has now said that it will not work with earlier versions of media player.  Is there a way of adapting the following code to make it detect the version of media player installed and use that?  It needs to work for IE, Netscape, Mozilla Firefox etc.  The version she said she had tried and had trouble with is media player 6.1.

Here is the code for the media player:

<td class="mplayerCell">
<object id="Player" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject" width="320" height="320">
      <param name="ShowStatusBar" value="true">
      <param name="autostart" value="true">
      <param name="ShowAudioControls" value="false">
      <param name="ShowDisplay" value="false">
      <param name="ShowGotoBar" value="false">
      <param name="ShowTracker" value="false">
      <param name="ShowPositionControls" value="false">
      <param name="CaptioningID" value="capText">

<div id=mediaPlayerMozilla>
<embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" showControls="1" width="320" height="320"></embed>
<div>
</object>
</td>


Thanks in advance,

John
ASKER CERTIFIED SOLUTION
Avatar of archrajan
archrajan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of john-formby

ASKER

Thanks for the speedy reply.  Let me get this right, I include the following line

<script type="text/javascript" src="sniffer2.js"></script>

in the head section of the page and it will automatically detect which version of the media player to load when the page is loaded?  I don't need to change any of the code I posted above?

Thanks,

John
Avatar of archrajan
archrajan

in that script u have this

if(is_WMP71up)

this wud return true if the windows media player version is greater than 7


now if its not windows media player 7 and above what does ur code needs to do?>
Is there anyway of getting it to work with version 6.1 of media player?  If not, or the user is using an earlier version, it needs to display a message and link saying that they need to upgrade the current version.  Is this possible?

John