| Author |
Message |
Richard Wallace
Guest
|
Posted:
Mon Apr 25, 2005 4:30 pm Post subject:
Status Bar |
|
|
Hi All,
I've inserted and windows media object into a web page, it looks and works
well. The object id is objMediaPlayer
I'd like to be able to display the status of this object in normal text
below the object, but not using the media player status bar (as that's not
what I want as I would like more control over the style).
Can anyone help me do this please? I've been trying for days looking on the
internet, but haven't found anything yet. But I have seen it working on
www.high.tv but haven't been able to see how they did it.
Many thanks in advance.
Regards,
Rich
|
|
| Back to top |
|
 |
Neil Smith [MVP Digital M
Guest
|
Posted:
Mon Apr 25, 2005 10:29 pm Post subject:
Re: Status Bar |
|
|
On Mon, 25 Apr 2005 08:01:05 -0700, Richard Wallace <Richard
Wallace@discussions.microsoft.com> wrote:
| Quote: | Hi All,
I've inserted and windows media object into a web page, it looks and works
well. The object id is objMediaPlayer
I'd like to be able to display the status of this object in normal text
below the object, but not using the media player status bar (as that's not
what I want as I would like more control over the style).
Can anyone help me do this please? I've been trying for days looking on the
internet, but haven't found anything yet. But I have seen it working on
www.high.tv but haven't been able to see how they did it.
Many thanks in advance.
Regards,
Rich
|
Well, the "Status" changes aren't available for media player 7 (though
the status strng *is*), so I would use playStateChange to be backward
compatible. Anyway : try this -
<html>
<head>
<script language="javascript1.2">
// var WMP7=new Object();
var WMP9=new Object();
var display=new Object();
function setPlayerID() {
WMP9=document.getElementById("MediaPlayer");
WMP9.attachEvent("StatusChange",setPlayerStatus);
// WMP7.attachEvent("PlayStateChange",setPlayerStatus);
}
function setPlayerStatus() {
display=document.getElementById("statusdisplay");
display.innerText=WMP9.status;
// display.innerText=WMP7.status;
}
</script>
</head>
<body onload="setPlayerID()">
<div id="statusdisplay">Default display text...</div>
<!-- Your media player here -->
</body>
HTH
Cheers - Neil |
|
| Back to top |
|
 |
Richard Wallace
Guest
|
Posted:
Mon Apr 25, 2005 11:31 pm Post subject:
Re: Status Bar |
|
|
Hi Neil,
Thanks for the reply, I'm having a little trouble getting it to work. Can
you see anything that I should change on the below page?
Many thanks again in advance.
Regards
Rich
-----------------------
<HTML>
<head>
<script language="javascript1.2">
// var WMP7=new Object();
var WMP9=new Object();
var display=new Object();
function setPlayerID() {
WMP9=document.getElementById("objMediaPlayer");
WMP9.attachEvent("StatusChange",setPlayerStatus);
// WMP7.attachEvent("PlayStateChange",setPlayerStatus);
}
function setPlayerStatus() {
display=document.getElementById("statusdisplay");
display.innerText=WMP9.status;
// display.innerText=WMP7.status;
}
</script>
</head>
<body onload="setPlayerID()">
<OBJECT ID="objMediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" WIDTH="438"
HEIGHT="329"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=,1,52,701"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<PARAM NAME="FILENAME" VALUE="my url here">
<EMBED type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
SRC="my url here"
width=438
height=329 autostart="True"
showcontrols="FALSE" showstatusbar="False"
showdisplay="False">
</EMBED>
<PARAM NAME="AutoStart" VALUE="True">
<PARAM NAME="TransparentAtStart" VALUE="True">
<PARAM NAME="ShowControls" VALUE="FALSE">
<PARAM NAME="ShowDisplay" VALUE="FALSE">
<PARAM NAME="ShowStatusBar" VALUE="FALSE">
<PARAM NAME="AutoSize" VALUE="FALSE">
</OBJECT>
<div id="statusdisplay">Default display text...</div>
</BODY>
</HTML>
-----------------------
"Neil Smith [MVP Digital Media]" wrote:
| Quote: | On Mon, 25 Apr 2005 08:01:05 -0700, Richard Wallace <Richard
Wallace@discussions.microsoft.com> wrote:
Hi All,
I've inserted and windows media object into a web page, it looks and works
well. The object id is objMediaPlayer
I'd like to be able to display the status of this object in normal text
below the object, but not using the media player status bar (as that's not
what I want as I would like more control over the style).
Can anyone help me do this please? I've been trying for days looking on the
internet, but haven't found anything yet. But I have seen it working on
www.high.tv but haven't been able to see how they did it.
Many thanks in advance.
Regards,
Rich
Well, the "Status" changes aren't available for media player 7 (though
the status strng *is*), so I would use playStateChange to be backward
compatible. Anyway : try this -
html
head
script language="javascript1.2"
// var WMP7=new Object();
var WMP9=new Object();
var display=new Object();
function setPlayerID() {
WMP9=document.getElementById("MediaPlayer");
WMP9.attachEvent("StatusChange",setPlayerStatus);
// WMP7.attachEvent("PlayStateChange",setPlayerStatus);
}
function setPlayerStatus() {
display=document.getElementById("statusdisplay");
display.innerText=WMP9.status;
// display.innerText=WMP7.status;
}
/script
/head
body onload="setPlayerID()"
div id="statusdisplay">Default display text...</div
!-- Your media player here --
/body
HTH
Cheers - Neil
|
|
|
| Back to top |
|
 |
Neil Smith [MVP Digital M
Guest
|
Posted:
Tue Apr 26, 2005 12:30 am Post subject:
Re: Status Bar |
|
|
Yes, you embedded with the older version 6.4 media player object
model. Although it may work, it's not guaranteed to, in particular,
the event model is changed. Use this embedding code instead :
<object id="MediaPlayer"
classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6"
type="video/x-ms-wma" width="438" height="329">
<param name="autostart" value="false" />
<param name="stretchtofit" value="true" />
<param name="url" value="my url here" />
<param name="uimode" value="mini" />
<param name="windowlessvideo" value="true" />
<!--[if !IE]> <-->
<object id="MediaPlayer2" type="video/x-ms-wma" width="438"
height="329" data="my url here">
<param name="filename" value="my url here" />
<param name="showcontrols" value="0" />
<param name="animationatstart" value="0" />
<param name="transparentatstart" value="1" />
<param name="showaudiocontrols" value="1" />
<param name="showtracker" value="0" />
<param name="showdisplay" value="0" />
<param name="showstatusbar" value="1" />
</object>
<!--> <![endif]-->
</object>
Cheers - Neil
On Mon, 25 Apr 2005 11:31:06 -0700, Richard Wallace
<RichardWallace@discussions.microsoft.com> wrote:
| Quote: | Hi Neil,
Thanks for the reply, I'm having a little trouble getting it to work. Can
you see anything that I should change on the below page?
Many thanks again in advance.
Regards
Rich
-----------------------
HTML
head
script language="javascript1.2"
// var WMP7=new Object();
var WMP9=new Object();
var display=new Object();
function setPlayerID() {
WMP9=document.getElementById("objMediaPlayer");
WMP9.attachEvent("StatusChange",setPlayerStatus);
// WMP7.attachEvent("PlayStateChange",setPlayerStatus);
}
function setPlayerStatus() {
display=document.getElementById("statusdisplay");
display.innerText=WMP9.status;
// display.innerText=WMP7.status;
}
/script
/head
body onload="setPlayerID()"
OBJECT ID="objMediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" WIDTH="438"
HEIGHT="329"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=,1,52,701"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject"
<PARAM NAME="FILENAME" VALUE="my url here"
<EMBED type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
SRC="my url here"
width=438
height=329 autostart="True"
showcontrols="FALSE" showstatusbar="False"
showdisplay="False"
/EMBED
<PARAM NAME="AutoStart" VALUE="True"
<PARAM NAME="TransparentAtStart" VALUE="True"
<PARAM NAME="ShowControls" VALUE="FALSE"
<PARAM NAME="ShowDisplay" VALUE="FALSE"
<PARAM NAME="ShowStatusBar" VALUE="FALSE"
<PARAM NAME="AutoSize" VALUE="FALSE"
/OBJECT
div id="statusdisplay">Default display text...</div
/BODY
/HTML
-----------------------
"Neil Smith [MVP Digital Media]" wrote:
On Mon, 25 Apr 2005 08:01:05 -0700, Richard Wallace <Richard
Wallace@discussions.microsoft.com> wrote:
Hi All,
I've inserted and windows media object into a web page, it looks and works
well. The object id is objMediaPlayer
I'd like to be able to display the status of this object in normal text
below the object, but not using the media player status bar (as that's not
what I want as I would like more control over the style).
Can anyone help me do this please? I've been trying for days looking on the
internet, but haven't found anything yet. But I have seen it working on
www.high.tv but haven't been able to see how they did it.
Many thanks in advance.
Regards,
Rich
Well, the "Status" changes aren't available for media player 7 (though
the status strng *is*), so I would use playStateChange to be backward
compatible. Anyway : try this -
html
head
script language="javascript1.2"
// var WMP7=new Object();
var WMP9=new Object();
var display=new Object();
function setPlayerID() {
WMP9=document.getElementById("MediaPlayer");
WMP9.attachEvent("StatusChange",setPlayerStatus);
// WMP7.attachEvent("PlayStateChange",setPlayerStatus);
}
function setPlayerStatus() {
display=document.getElementById("statusdisplay");
display.innerText=WMP9.status;
// display.innerText=WMP7.status;
}
/script
/head
body onload="setPlayerID()"
div id="statusdisplay">Default display text...</div
!-- Your media player here --
/body
HTH
Cheers - Neil
|
|
|
| Back to top |
|
 |
Richard Wallace
Guest
|
Posted:
Tue Apr 26, 2005 1:32 pm Post subject:
Re: Status Bar |
|
|
Brilliant, thank Neil, all working now.
Cheers,
Rich
"Neil Smith [MVP Digital Media]" wrote:
| Quote: | Yes, you embedded with the older version 6.4 media player object
model. Although it may work, it's not guaranteed to, in particular,
the event model is changed. Use this embedding code instead :
object id="MediaPlayer"
classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6"
type="video/x-ms-wma" width="438" height="329"
<param name="autostart" value="false" /
<param name="stretchtofit" value="true" /
<param name="url" value="my url here" /
<param name="uimode" value="mini" /
<param name="windowlessvideo" value="true" /
<!--[if !IE]> <--
<object id="MediaPlayer2" type="video/x-ms-wma" width="438"
height="329" data="my url here"
<param name="filename" value="my url here" /
<param name="showcontrols" value="0" /
<param name="animationatstart" value="0" /
<param name="transparentatstart" value="1" /
<param name="showaudiocontrols" value="1" /
<param name="showtracker" value="0" /
<param name="showdisplay" value="0" /
<param name="showstatusbar" value="1" /
</object
<!--> <![endif]--
/object
Cheers - Neil
On Mon, 25 Apr 2005 11:31:06 -0700, Richard Wallace
RichardWallace@discussions.microsoft.com> wrote:
Hi Neil,
Thanks for the reply, I'm having a little trouble getting it to work. Can
you see anything that I should change on the below page?
Many thanks again in advance.
Regards
Rich
-----------------------
HTML
head
script language="javascript1.2"
// var WMP7=new Object();
var WMP9=new Object();
var display=new Object();
function setPlayerID() {
WMP9=document.getElementById("objMediaPlayer");
WMP9.attachEvent("StatusChange",setPlayerStatus);
// WMP7.attachEvent("PlayStateChange",setPlayerStatus);
}
function setPlayerStatus() {
display=document.getElementById("statusdisplay");
display.innerText=WMP9.status;
// display.innerText=WMP7.status;
}
/script
/head
body onload="setPlayerID()"
OBJECT ID="objMediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" WIDTH="438"
HEIGHT="329"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=,1,52,701"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject"
<PARAM NAME="FILENAME" VALUE="my url here"
<EMBED type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
SRC="my url here"
width=438
height=329 autostart="True"
showcontrols="FALSE" showstatusbar="False"
showdisplay="False"
/EMBED
<PARAM NAME="AutoStart" VALUE="True"
<PARAM NAME="TransparentAtStart" VALUE="True"
<PARAM NAME="ShowControls" VALUE="FALSE"
<PARAM NAME="ShowDisplay" VALUE="FALSE"
<PARAM NAME="ShowStatusBar" VALUE="FALSE"
<PARAM NAME="AutoSize" VALUE="FALSE"
/OBJECT
div id="statusdisplay">Default display text...</div
/BODY
/HTML
-----------------------
"Neil Smith [MVP Digital Media]" wrote:
On Mon, 25 Apr 2005 08:01:05 -0700, Richard Wallace <Richard
Wallace@discussions.microsoft.com> wrote:
Hi All,
I've inserted and windows media object into a web page, it looks and works
well. The object id is objMediaPlayer
I'd like to be able to display the status of this object in normal text
below the object, but not using the media player status bar (as that's not
what I want as I would like more control over the style).
Can anyone help me do this please? I've been trying for days looking on the
internet, but haven't found anything yet. But I have seen it working on
www.high.tv but haven't been able to see how they did it.
Many thanks in advance.
Regards,
Rich
Well, the "Status" changes aren't available for media player 7 (though
the status strng *is*), so I would use playStateChange to be backward
compatible. Anyway : try this -
html
head
script language="javascript1.2"
// var WMP7=new Object();
var WMP9=new Object();
var display=new Object();
function setPlayerID() {
WMP9=document.getElementById("MediaPlayer");
WMP9.attachEvent("StatusChange",setPlayerStatus);
// WMP7.attachEvent("PlayStateChange",setPlayerStatus);
}
function setPlayerStatus() {
display=document.getElementById("statusdisplay");
display.innerText=WMP9.status;
// display.innerText=WMP7.status;
}
/script
/head
body onload="setPlayerID()"
div id="statusdisplay">Default display text...</div
!-- Your media player here --
/body
HTH
Cheers - Neil
|
|
|
| Back to top |
|
 |
|
|
|
|