how do I set WMPlayer version before download?
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
how do I set WMPlayer version before download?

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Windows Media on Web
Author Message
Rawtv.com
Guest





Posted: Wed Apr 13, 2005 5:24 am    Post subject: how do I set WMPlayer version before download? Reply with quote

I know this may be simple to do, but how can I creat and instruction to make
sure that the end user has Windows media 9 or higher before they play my test
file?

My test file is does not require a DRM but the rest of my media does and the
end user must have wm9. As it stands now, my test file will playback on wm7
which will misslead my users that they can play DRM encrypted files.

Thanks!!

Back to top
Neil Smith [MVP Digital M
Guest





Posted: Wed Apr 13, 2005 8:25 am    Post subject: Re: how do I set WMPlayer version before download? Reply with quote

You'll need to embed the player in the web page.

Then you need the HTML ID of the player object in your web page, let's
say you've called it "MediaPlayer" then you'd use

<body onload="checkVersion()">

and in the head of the page :

<script language="javascript1.2">
function checkVersion() {
var player=document.getElementById("MediaPlayer");
playerVersion=parseInt(player.versionInfo);
if (playerVersion < 9) {
alert("You need to update your windows media player");
}
}
</script>

You can embed a hidden player in the body of the web page like this if
you just need it for testing purposes :

<object id="mediaplayer"
classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6"
type="application/x-oleobject" width="0" height="0">
<param name="autostart" value="0" />
<param name="showcontrols" value="0" />
<param name="uimode" value="invisible" />
</object>

Cheers - Neil

On Tue, 12 Apr 2005 22:24:02 -0700, Rawtv.com
<Rawtv.com@discussions.microsoft.com> wrote:

Quote:
I know this may be simple to do, but how can I creat and instruction to make
sure that the end user has Windows media 9 or higher before they play my test
file?

My test file is does not require a DRM but the rest of my media does and the
end user must have wm9. As it stands now, my test file will playback on wm7
which will misslead my users that they can play DRM encrypted files.

Thanks!!

Back to top
Sebastian Gottschalk
Guest





Posted: Sun Apr 24, 2005 11:43 pm    Post subject: Re: how do I set WMPlayer version before download? Reply with quote

Neil Smith [MVP Digital Media] wrote:

Quote:
You'll need to embed the player in the web page.

Then you need the HTML ID of the player object in your web page, let's
say you've called it "MediaPlayer" then you'd use

body onload="checkVersion()"

and in the head of the page :

script language="javascript1.2"
function checkVersion() {
var player=document.getElementById("MediaPlayer");
playerVersion=parseInt(player.versionInfo);
if (playerVersion < 9) {
alert("You need to update your windows media player");
}
}
/script

How should that work? player.versionInfo isn't a valid object.
YOu should better use an enumeration of navigator.plugins.


Quote:
You can embed a hidden player in the body of the web page like this if
you just need it for testing purposes :

object id="mediaplayer"
classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6"
type="application/x-oleobject" width="0" height="0"
<param name="autostart" value="0" /
<param name="showcontrols" value="0" /
<param name="uimode" value="invisible" /
/object

And how should that work? The data attribute is missing, the classid is
invalid, the param stuff is invalid...
--
Dieser Schrieb stellt eine private Meinungsäußerung des Verfassers im
Sinne der gesetzlich garantierten Meinungsfreiheit dar. Wem das nicht
passt, der wende sich an das Bundesverfassungsgericht. Viel Erfolg!
Key: 0xA0E28D18 FP: 83AE 1136 1E2B 9767 8FB2 7594 4128 1A9E A0E2 8D18

Back to top
Neil Smith [MVP Digital M
Guest





Posted: Mon Apr 25, 2005 4:30 pm    Post subject: Re: how do I set WMPlayer version before download? Reply with quote

On Sun, 24 Apr 2005 20:43:30 +0200, Sebastian Gottschalk
<seppi@seppig.de> wrote:

Quote:
Neil Smith [MVP Digital Media] wrote:

script language="javascript1.2"
function checkVersion() {
var player=document.getElementById("MediaPlayer");
playerVersion=parseInt(player.versionInfo);
if (playerVersion < 9) {
alert("You need to update your windows media player");
}
}
/script

How should that work? player.versionInfo isn't a valid object

It sure is, but you need to be querying the correct version of the
player object. It's not valid for media player 6.4 (which would
respond to this sort of hackery :

var isMP64 = navigator.mimeTypes &&
navigator.mimeTypes["video/x-ms-wm"] &&
navigator.mimeTypes["video/x-ms-wm"].enabledPlugin &&
navigator.mimeTypes["video/x-ms-wmv"] &&
navigator.mimeTypes["video/x-ms-wmv"].enabledPlugin;

Quote:
YOu should better use an enumeration of navigator.plugins.

You're right of course, but given the limited information provided by
the OP, I showed him code which would work only in IE until he
complained it didn't work in other browsers. Navigator.plugins of
course are *not* available to IE browsers.

Quote:
You can embed a hidden player in the body of the web page like this if
you just need it for testing purposes :

object id="mediaplayer"
classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6"
type="application/x-oleobject" width="0" height="0"
<param name="autostart" value="0" /
<param name="showcontrols" value="0" /
<param name="uimode" value="invisible" /
/object

And how should that work? The data attribute is missing,

True, a more compatible version would look like this : but let's
remember, we're not trying to load a media file here, so we have some
more work to do using the data attribute of the object.

Since (a) no browsers support the "data" attribute for windows media
content and (b) the OP now has to write conditional code depending on
which object ID within the DOM returns null when queried.

<object id="MediaPlayer"
classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6"
type="video/x-ms-wma" width="1" height="1">
<param name="autostart" value="false" />
<param name="showcontrols" value="0" />
<param name="uimode" value="invisible" />
<!--[if !IE]> <-->
<object id="MediaPlayer2" type="video/x-ms-wma" width="1"
height="1" data="dummy_audio_file.wma">
<param name="filename" value="dummy_audio_file.wma" />
<param name="showcontrols" value="0" />
<param name="showaudiocontrols" value="0" />
<param name="showtracker" value="0" />
<param name="showdisplay" value="0" />
<param name="showstatusbar" value="0" />
</object>
<!--> <![endif]-->
</object>

Quote:
the classid is invalid

Actually, for version 7 and later of media player it is correct.

Quote:
the param stuff is invalid...

Actually, for version 7 and later of media player it is correct. Param
elements are perfectly valid in XHTML so I'm not clear what your point
is there !

http://www.w3.org/TR/2004/WD-xhtml2-20040722/mod-object.html

Cheers - Neil
Back to top
Sebastian Gottschalk
Guest





Posted: Tue Apr 26, 2005 12:30 am    Post subject: Re: how do I set WMPlayer version before download? Reply with quote

Neil Smith [MVP Digital Media] wrote:


Quote:
script language="javascript1.2"
function checkVersion() {
var player=document.getElementById("MediaPlayer");
playerVersion=parseInt(player.versionInfo);
if (playerVersion < 9) {
alert("You need to update your windows media player");
}
}
/script

How should that work? player.versionInfo isn't a valid object

It sure is,

I'm sure that is is definitely not, at least not until you're using
JSObject.security.SecurityManager.EnablePrivilege(); - without no
non-crappy browser will allow you to access plugin data via JavaScript.

Quote:
YOu should better use an enumeration of navigator.plugins.

You're right of course, but given the limited information provided by
the OP, I showed him code which would work only in IE until he
complained it didn't work in other browsers. Navigator.plugins of
course are *not* available to IE browsers.

IE is no webbrowser, therefore there's no need to care for it at all. :-)

Quote:
the classid is invalid

Actually, for version 7 and later of media player it is correct.

Absolutely not. The Classid must be a unique system-independent value of
the form http://URL, ftp://URL, java:ClasName or
ObjectName.SubObject.SubSubObject.[...]. The CLSID protocol is not
system-independent and the correct identifier for WMP is WMPlayer.WMPlayer.

Quote:
Actually, for version 7 and later of media player it is correct. Param
elements are perfectly valid in XHTML so I'm not clear what your point
is there !

http://www.w3.org/TR/2004/WD-xhtml2-20040722/mod-object.html

Sorry, I was assuming HTML 4.01.
--
Dieser Schrieb stellt eine private Meinungsäußerung des Verfassers im
Sinne der gesetzlich garantierten Meinungsfreiheit dar. Wem das nicht
passt, der wende sich an das Bundesverfassungsgericht. Viel Erfolg!
Key: 0xA0E28D18 FP: 83AE 1136 1E2B 9767 8FB2 7594 4128 1A9E A0E2 8D18
Back to top
Neil Smith [MVP Digital M
Guest





Posted: Tue Apr 26, 2005 8:30 am    Post subject: Re: how do I set WMPlayer version before download? Reply with quote

On Tue, 26 Apr 2005 01:09:18 +0200, Sebastian Gottschalk
<seppi@seppig.de> wrote:

Quote:
Neil Smith [MVP Digital Media] wrote:

How should that work? player.versionInfo isn't a valid object

It sure is,

I'm sure that is is definitely not, at least not until you're using
JSObject.security.SecurityManager.EnablePrivilege(); - without no
non-crappy browser will allow you to access plugin data via JavaScript.

I absolutely assure you, it is a valid *property* of a player object.

Quote:
IE is no webbrowser, therefore there's no need to care for it at all. :-)

I don't understand where you brought in the discussion of IE as being
an invalid browser (and there are certain areas I might agree with
you, but this isn't one of them) anyway as it's used by 80+% of the
internet "viewing" public.

I think you ought to forget about the browser war approach - I'm a web
developer and I'm just not interested in discussing this any further.

Quote:
the classid is invalid

Actually, for version 7 and later of media player it is correct.

Absolutely not. The Classid must be a unique system-independent value of
the form http://URL, ftp://URL, java:ClasName or
ObjectName.SubObject.SubSubObject.[...].

W3C standards (do not* mandate the use of classid in any form - it's
an "invented" attribute provided by microsoft for use on windows
systems to subvert the usual plugin behaviour.

Right or wrong, it's appropriate for use in IE on windows,end of line.

Other specifiers (such as you noted, data and object type), as well as
the mime type reported by the server, are used by conforming browsers
to pass the plugin data stream to the plugin handler. Ideally it
should begin with a namespace prefix *not* a protocol prefix such as
ftp. Protocols are used only to refer to data sources *never* to a
handler resource.

Quote:
Actually, for version 7 and later of media player it is correct. Param
elements are perfectly valid in XHTML so I'm not clear what your point
is there !

http://www.w3.org/TR/2004/WD-xhtml2-20040722/mod-object.html

Sorry, I was assuming HTML 4.01.

And why would you assume that ? I clearly posted XHTML code -
otherwise I would be using the crappy singleton attributes and
unclosed tags :-p

Cheers - Neil
Back to top
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Windows Media on Web All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB