| Author |
Message |
urug haiml
Guest
|
Posted:
Wed Jul 28, 2004 2:56 pm Post subject:
Problem with getting currentPosition |
|
|
Im trying to get the current position from the media player object from my
web page. Ive tried:
var currentPos = mediaPlayer.controls.currentPosition;
where mediaPlayer is the ID of the player object. The error message is:
'mediaPlayer.controls.currentPosition is null or not an object on line133'
The same thing happens when i try to set the current position
mediaPlayer.controls.currentPosition = 150;
Please help me..
|
|
| Back to top |
|
 |
Neil Smith [MVP Digital M
Guest
|
Posted:
Wed Jul 28, 2004 9:45 pm Post subject:
Re: Problem with getting currentPosition |
|
|
Which version of media player are you using ? This is WMP7 / 9 syntax
and you might be using WMP6.4. Do you have any other properties of the
object which work OK ?
Cheers - Neil
On Wed, 28 Jul 2004 13:56:22 +0300, "urug haiml"
<taisto69@hotmail.com> wrote:
| Quote: | Im trying to get the current position from the media player object from my
web page. Ive tried:
var currentPos = mediaPlayer.controls.currentPosition;
where mediaPlayer is the ID of the player object. The error message is:
'mediaPlayer.controls.currentPosition is null or not an object on line133'
The same thing happens when i try to set the current position
mediaPlayer.controls.currentPosition = 150;
Please help me..
|
|
|
| Back to top |
|
 |
urug haiml
Guest
|
Posted:
Thu Jul 29, 2004 12:05 pm Post subject:
Re: Problem with getting currentPosition |
|
|
The player object is the same as in my previous post "action when media
ends" which im still by the way working on. Im using the 9 series player,
but the clsid of my object is the same as in wmp 6.4
CLASSID="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
document.mediaPlayer.DisplaySize = 3; // this works fine..
"Neil Smith [MVP Digital Media]" <neil@nospam.com> wrote in message
news:n9qfg05lr6ruh1svmp339fjk3epi79jd29@4ax.com...
| Quote: | Which version of media player are you using ? This is WMP7 / 9 syntax
and you might be using WMP6.4. Do you have any other properties of the
object which work OK ?
Cheers - Neil
On Wed, 28 Jul 2004 13:56:22 +0300, "urug haiml"
taisto69@hotmail.com> wrote:
Im trying to get the current position from the media player object from
my
web page. Ive tried:
var currentPos = mediaPlayer.controls.currentPosition;
where mediaPlayer is the ID of the player object. The error message is:
'mediaPlayer.controls.currentPosition is null or not an object on
line133'
The same thing happens when i try to set the current position
mediaPlayer.controls.currentPosition = 150;
Please help me..
|
|
|
| Back to top |
|
 |
Neil Smith [MVP Digital M
Guest
|
Posted:
Thu Jul 29, 2004 8:04 pm Post subject:
Re: Problem with getting currentPosition |
|
|
Well, that's wrong : You're probably putting the player into
compatibility mode with WMP6.4 by using that object tag - I guess it's
interpreting that as 'use the old WMP6 object model' and you're then
using WMP9 object model in your scripting.
Use this classid : 6BF52A52-394A-11d3-B153-00C04F79FAA6
Cheers - Neil
On Thu, 29 Jul 2004 11:05:00 +0300, "urug haiml"
<taisto69@hotmail.com> wrote:
| Quote: | The player object is the same as in my previous post "action when media
ends" which im still by the way working on. Im using the 9 series player,
but the clsid of my object is the same as in wmp 6.4
CLASSID="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
document.mediaPlayer.DisplaySize = 3; // this works fine..
"Neil Smith [MVP Digital Media]" <neil@nospam.com> wrote in message
news:n9qfg05lr6ruh1svmp339fjk3epi79jd29@4ax.com...
Which version of media player are you using ? This is WMP7 / 9 syntax
and you might be using WMP6.4. Do you have any other properties of the
object which work OK ?
Cheers - Neil
On Wed, 28 Jul 2004 13:56:22 +0300, "urug haiml"
taisto69@hotmail.com> wrote:
Im trying to get the current position from the media player object from
my
web page. Ive tried:
var currentPos = mediaPlayer.controls.currentPosition;
where mediaPlayer is the ID of the player object. The error message is:
'mediaPlayer.controls.currentPosition is null or not an object on
line133'
The same thing happens when i try to set the current position
mediaPlayer.controls.currentPosition = 150;
Please help me..
|
|
|
| Back to top |
|
 |
Neil Smith [MVP Digital M
Guest
|
Posted:
Thu Jul 29, 2004 8:32 pm Post subject:
Re: Problem with getting currentPosition |
|
|
** And it probably explains why you're getting different playstates
than the rest of us. I didn't note the line about your previous post
(or remember it, there's lots going on in this NG)
You'll probably need to modify the param tags (use url rather than
filename), oh, and animationatstart will have to go, too. But then
your scripting can use the WMP7 / 9 model which is more flexible if a
bit more verbose.
Try to take a look over the WMP9 SDK documenation on MSDN,
(msdn.microsoft.com) it's your best hope of getting out of the
mixed-metaphors you're currently using with the activeX control ;-)
Cheers - Neil
On Thu, 29 Jul 2004 16:04:45 GMT, "Neil Smith [MVP Digital Media]"
<neil@nospam.com> wrote:
| Quote: | Well, that's wrong : You're probably putting the player into
compatibility mode with WMP6.4 by using that object tag - I guess it's
interpreting that as 'use the old WMP6 object model' and you're then
using WMP9 object model in your scripting.
Use this classid : 6BF52A52-394A-11d3-B153-00C04F79FAA6
Cheers - Neil
On Thu, 29 Jul 2004 11:05:00 +0300, "urug haiml"
taisto69@hotmail.com> wrote:
The player object is the same as in my previous post "action when media
ends" which im still by the way working on. Im using the 9 series player,
but the clsid of my object is the same as in wmp 6.4
CLASSID="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
document.mediaPlayer.DisplaySize = 3; // this works fine..
"Neil Smith [MVP Digital Media]" <neil@nospam.com> wrote in message
news:n9qfg05lr6ruh1svmp339fjk3epi79jd29@4ax.com...
Which version of media player are you using ? This is WMP7 / 9 syntax
and you might be using WMP6.4. Do you have any other properties of the
object which work OK ?
Cheers - Neil
On Wed, 28 Jul 2004 13:56:22 +0300, "urug haiml"
taisto69@hotmail.com> wrote:
Im trying to get the current position from the media player object from
my
web page. Ive tried:
var currentPos = mediaPlayer.controls.currentPosition;
where mediaPlayer is the ID of the player object. The error message is:
'mediaPlayer.controls.currentPosition is null or not an object on
line133'
The same thing happens when i try to set the current position
mediaPlayer.controls.currentPosition = 150;
Please help me..
|
|
|
| Back to top |
|
 |
urug haiml
Guest
|
Posted:
Fri Jul 30, 2004 12:29 pm Post subject:
Re: Problem with getting currentPosition |
|
|
I got the solution i needed to rebuild my player object. If I just changed
the classid, nothing worked, but when i gave all new parameters, then the
magic happened. This is the code that worked
<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"
id="mediaPlayer">
<param name="URL" value="">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value>
<param name="playCount" value="1">
<param name="autoStart" value="1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value>
<param name="volume" value="50">
<param name="mute" value="0">
<param name="uiMode" value="full">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="captioningID" value>
<param name="enableErrorDialogs" value="0">
</object>
"Neil Smith [MVP Digital Media]" <neil@nospam.com> wrote in message
news:v7aig0h36nksd3uu3vjdgmr2o14h4kmb5v@4ax.com...
| Quote: | ** And it probably explains why you're getting different playstates
than the rest of us. I didn't note the line about your previous post
(or remember it, there's lots going on in this NG)
You'll probably need to modify the param tags (use url rather than
filename), oh, and animationatstart will have to go, too. But then
your scripting can use the WMP7 / 9 model which is more flexible if a
bit more verbose.
Try to take a look over the WMP9 SDK documenation on MSDN,
(msdn.microsoft.com) it's your best hope of getting out of the
mixed-metaphors you're currently using with the activeX control ;-)
Cheers - Neil
On Thu, 29 Jul 2004 16:04:45 GMT, "Neil Smith [MVP Digital Media]"
neil@nospam.com> wrote:
Well, that's wrong : You're probably putting the player into
compatibility mode with WMP6.4 by using that object tag - I guess it's
interpreting that as 'use the old WMP6 object model' and you're then
using WMP9 object model in your scripting.
Use this classid : 6BF52A52-394A-11d3-B153-00C04F79FAA6
Cheers - Neil
On Thu, 29 Jul 2004 11:05:00 +0300, "urug haiml"
taisto69@hotmail.com> wrote:
The player object is the same as in my previous post "action when media
ends" which im still by the way working on. Im using the 9 series
player,
but the clsid of my object is the same as in wmp 6.4
CLASSID="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
document.mediaPlayer.DisplaySize = 3; // this works fine..
"Neil Smith [MVP Digital Media]" <neil@nospam.com> wrote in message
news:n9qfg05lr6ruh1svmp339fjk3epi79jd29@4ax.com...
Which version of media player are you using ? This is WMP7 / 9 syntax
and you might be using WMP6.4. Do you have any other properties of the
object which work OK ?
Cheers - Neil
On Wed, 28 Jul 2004 13:56:22 +0300, "urug haiml"
taisto69@hotmail.com> wrote:
Im trying to get the current position from the media player object
from
my
web page. Ive tried:
var currentPos = mediaPlayer.controls.currentPosition;
where mediaPlayer is the ID of the player object. The error message
is:
'mediaPlayer.controls.currentPosition is null or not an object on
line133'
The same thing happens when i try to set the current position
mediaPlayer.controls.currentPosition = 150;
Please help me..
|
|
|
| Back to top |
|
 |
Neil Smith [MVP Digital M
Guest
|
Posted:
Fri Jul 30, 2004 6:28 pm Post subject:
Re: Problem with getting currentPosition |
|
|
Glad it worked out ;-)
On Fri, 30 Jul 2004 11:29:39 +0300, "urug haiml"
<taisto69@hotmail.com> wrote:
| Quote: | I got the solution i needed to rebuild my player object. If I just changed
the classid, nothing worked, but when i gave all new parameters, then the
magic happened. This is the code that worked
object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"
id="mediaPlayer"
param name="URL" value=""
param name="rate" value="1"
param name="balance" value="0"
param name="currentPosition" value="0"
param name="defaultFrame" value
param name="playCount" value="1"
param name="autoStart" value="1"
param name="currentMarker" value="0"
param name="invokeURLs" value="-1"
param name="baseURL" value
param name="volume" value="50"
param name="mute" value="0"
param name="uiMode" value="full"
param name="stretchToFit" value="0"
param name="windowlessVideo" value="0"
param name="enabled" value="-1"
param name="enableContextMenu" value="-1"
param name="fullScreen" value="0"
param name="SAMIStyle" value
param name="SAMILang" value
param name="SAMIFilename" value
param name="captioningID" value
param name="enableErrorDialogs" value="0"
/object
"Neil Smith [MVP Digital Media]" <neil@nospam.com> wrote in message
news:v7aig0h36nksd3uu3vjdgmr2o14h4kmb5v@4ax.com...
** And it probably explains why you're getting different playstates
than the rest of us. I didn't note the line about your previous post
(or remember it, there's lots going on in this NG)
You'll probably need to modify the param tags (use url rather than
filename), oh, and animationatstart will have to go, too. But then
your scripting can use the WMP7 / 9 model which is more flexible if a
bit more verbose.
Try to take a look over the WMP9 SDK documenation on MSDN,
(msdn.microsoft.com) it's your best hope of getting out of the
mixed-metaphors you're currently using with the activeX control ;-)
Cheers - Neil
On Thu, 29 Jul 2004 16:04:45 GMT, "Neil Smith [MVP Digital Media]"
neil@nospam.com> wrote:
Well, that's wrong : You're probably putting the player into
compatibility mode with WMP6.4 by using that object tag - I guess it's
interpreting that as 'use the old WMP6 object model' and you're then
using WMP9 object model in your scripting.
Use this classid : 6BF52A52-394A-11d3-B153-00C04F79FAA6
Cheers - Neil
On Thu, 29 Jul 2004 11:05:00 +0300, "urug haiml"
taisto69@hotmail.com> wrote:
The player object is the same as in my previous post "action when media
ends" which im still by the way working on. Im using the 9 series
player,
but the clsid of my object is the same as in wmp 6.4
CLASSID="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
document.mediaPlayer.DisplaySize = 3; // this works fine..
"Neil Smith [MVP Digital Media]" <neil@nospam.com> wrote in message
news:n9qfg05lr6ruh1svmp339fjk3epi79jd29@4ax.com...
Which version of media player are you using ? This is WMP7 / 9 syntax
and you might be using WMP6.4. Do you have any other properties of the
object which work OK ?
Cheers - Neil
On Wed, 28 Jul 2004 13:56:22 +0300, "urug haiml"
taisto69@hotmail.com> wrote:
Im trying to get the current position from the media player object
from
my
web page. Ive tried:
var currentPos = mediaPlayer.controls.currentPosition;
where mediaPlayer is the ID of the player object. The error message
is:
'mediaPlayer.controls.currentPosition is null or not an object on
line133'
The same thing happens when i try to set the current position
mediaPlayer.controls.currentPosition = 150;
Please help me..
|
|
|
| Back to top |
|
 |
|
|
|
|