Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Detect Media Player Version and Use

Posted on 2005-05-09
4
Medium Priority
?
1,046 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:john-formby
  • 2
  • 2
4 Comments
 
LVL 25

Accepted Solution

by:
archrajan earned 2000 total points
ID: 13962436
Hi,
This link http://www.webreference.com/tools/browser/sniffer2.js
has the code to check the version of windows media player
0
 
LVL 14

Author Comment

by:john-formby
ID: 13962667
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
0
 
LVL 25

Expert Comment

by:archrajan
ID: 13962783
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?>
0
 
LVL 14

Author Comment

by:john-formby
ID: 13962851
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
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question