embed wmp wont loop .. how?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fird01
Forum Newbie
Posts: 19
Joined: Mon Apr 07, 2008 11:04 pm

embed wmp wont loop .. how?

Post by fird01 »

i dont know if this is the right forum..
i've embed wmp player into php page.. the thing is .. it wont loop when finish playing ..

Code: Select all

 
<OBJECT id='mediaPlayer' width="754" height="457"
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'>
<param name='fileName' value="http"//localhost/3/avi/<? echo $avi;?>.avi" >
<param name='animationatStart' value='1' >
<param name='transparentatStart' value='0' >
<param name='autoStart' value='1' >
<param name='ShowControls' value='0' >
<param name='ShowDisplay' value='0' >
<param name='ShowStatusBar' value='0' >
<param name='loop' value= INFINITE >
<EMBED type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/ en/download/'
id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='0'
bgcolor='darkblue' showcontrols='0' showtracker='1'
showdisplay='0' showstatusbar='0' videoborder3d='0' width="754" height="457"
src="http://localhost/3/avi/<? echo $avi;?>.avi" autostart='1' designtimesp='5311' loop=INFINITE >
</EMBED>
</OBJECT>
i've tried loop=1 .. loop =true ...loop=infinite ... loop =99 ... it still dont wanna loop.. after playing a file then it stops there..
im using firefox btw...
User avatar
Kadanis
Forum Contributor
Posts: 180
Joined: Tue Jun 20, 2006 8:55 am
Location: Dorset, UK
Contact:

Re: embed wmp wont loop .. how?

Post by Kadanis »

I believe you have to use this to state how many loops to do. If you want it to loop for ever just put a high number in there.

Code: Select all

 
<PARAM name="PlayCount" value="3">
 
In your <embed> tag you need a loop="true" as well

So your final code should look something like this. Although I haven't had a chance to test it.

Code: Select all

 
<OBJECT id='mediaPlayer' width="754" height="457"
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'>
<param name='fileName' value="http"//localhost/3/avi/<? echo $avi;?>.avi" >
<param name='animationatStart' value='1' >
<param name='transparentatStart' value='0' >
<param name='autoStart' value='1' >
<param name='ShowControls' value='0' >
<param name='ShowDisplay' value='0' >
<param name='ShowStatusBar' value='0' >
<param name='PlayCount' value='1000'>
<EMBED type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/ en/download/' id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='0'
bgcolor='darkblue' showcontrols='0' showtracker='1' showdisplay='0' showstatusbar='0' videoborder3d='0' width="754" height="457"
src="http://localhost/3/avi/<? echo $avi;?>.avi" autostart='1' designtimesp='5311' loop='true'>
</EMBED>
</OBJECT>
 
fird01
Forum Newbie
Posts: 19
Joined: Mon Apr 07, 2008 11:04 pm

Re: embed wmp wont loop .. how?

Post by fird01 »

thx for the help..
im trying your coding...
and im also trying to autorewind=true and what is that designtimesp='5311' thing.. may be that parameter is limiting the time playing.. im trying your coding now..
fird01
Forum Newbie
Posts: 19
Joined: Mon Apr 07, 2008 11:04 pm

Re: embed wmp wont loop .. how?

Post by fird01 »

no it wont work.. still wont loop..
User avatar
Kadanis
Forum Contributor
Posts: 180
Joined: Tue Jun 20, 2006 8:55 am
Location: Dorset, UK
Contact:

Re: embed wmp wont loop .. how?

Post by Kadanis »

I've had a look again, and the code is correct. However, it appears that WMP will only loop in IE. I've tried it in Opera, FireFox and Safari but the loop only occurs in IE.

You may need to look for some cross browser code that supports looping.
fird01
Forum Newbie
Posts: 19
Joined: Mon Apr 07, 2008 11:04 pm

Re: embed wmp wont loop .. how?

Post by fird01 »

thx for the info.. and also the help..
Post Reply