controls.pause( ) not working
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
controls.pause( ) not working

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK
Author Message
jgpisano



Joined: 28 Dec 2005
Posts: 4

Posted: Wed Dec 28, 2005 8:42 am    Post subject: controls.pause( ) not working Reply with quote

Hi,
I have a problem that I think is quite simple but I havent been able to find the solution. I create a simple WMP object in a ASP web page with the following parameters:

<param name="URL" value="mms://<%=pp_alias(x,0)%>" />
<PARAM NAME="uiMode" VALUE="none">



I can view the media in a propper way, but when I call the methods MediaPlayer1.controls.Pause( ) and MediaPlayer1.controls.Resume they are not workinging as the method MediaPlayer1.controls.IsAvailable('Pause') returns true. How can I enable the Pause( ) method (i dont want to sent the uiMode to "full" as I dont want to see the player controls in my web page.

Regards,

Javi

Back to top
View user's profile Send private message Send e-mail
Neil Smith [MVP Digital M
Guest





Posted: Wed Dec 28, 2005 1:30 pm    Post subject: Re: controls.pause( ) not working Reply with quote

On Wed, 28 Dec 2005 03:30:09 -0600,
jgpisano@gmail-dot-com.no-spam.invalid (jgpisano) wrote:

Quote:
Hi,
I have a problem that I think is quite simple but I havent been
able to find the solution. I create a simple WMP object in a ASP web
page with the following parameters:

You missed off your object tag. Without that we can't diagnose your
specific problem ! Are you *sure* your object ID is MediaPlayer1 ? How
do you access that object in the browser and which browsers are you
using ?

Quote:
param name="URL" value="mms://<%=pp_alias(x,0)%>">/
param name="uiMode" value="none">

I can view the media in a propper way, but when I call the methods
MediaPlayer1.controls.Pause( ) and MediaPlayer1.controls.Resume they
are not workinging as the method

Are you using Javascript to set those controls ? I'm surprised you
didn't realise it's case-sensitive language unlike VB. Does it work
(wild stab) if you ask for controls.pause() and controls.play() ?

There's no controls.resume() command, you're thinking of the DVD
control command player.dvd.resume(), which doesn't apply to anything
except a paused DVD disk.

Quote:
MediaPlayer1.controls.IsAvailable('Pause') returns true.

Confusingly and somewhat irrationally, the isAvailable method actually
doesn't distinguish its argument in a case sensitive way, so that's
misleading.

HTH
Cheers - Neil
Back to top
jgpisano



Joined: 28 Dec 2005
Posts: 4

Posted: Tue Jan 03, 2006 11:25 am    Post subject: Reply with quote

Hi Neil,
thanks very much you for your reply.

I thougth the object tag wouldnt be important so I just wrote the param tags, here you are the full code:

<object id="MediaPlayer1" width=<%=ancho%> height=<%=alto%> classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
standby="Loading Microsoft® Windows® Media Player components..." type="application/x-oleobject"

VIEWASTEXT >
<param name="URL" value="mms://<%=pp_alias(x,0)%>" />
<PARAM NAME="uiMode" VALUE="none">
<param name="enableContextMenu" value="false">
<param name="enabled" value="false">
<param name="fullScreen" value="false">
</object>

I am sure about the object name, as I can handle some events for it. I am debugging in IE6

the methods were writtten in a proper way (as I copied them from the WMP help). I just confused when wirtting them for explaining my problem, sorry about it (and they were controls.pause() and controls.play).

About the IsAvailable method, the help provides a sample where the control is writen with its first character in capital [onClick = "if (Player.controls.isAvailable('CurrentPosition'))]. I took it fro mthis example.

Back to top
View user's profile Send private message Send e-mail
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK 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