AmbroseChapel
AmbroseChapel

Reputation: 12087

Stop embedded Windows Media Player from looping?

I've got an embedded Windows Media player in an HTML page, and when the audio gets to the end, it just starts again from the beginning.

According to the documentation, there's an autorewind parameter/attribute and also a loop.

The problem is, I've set both of those to false (and/or zero) and it doesn't seem to make any difference.

Might this be a bug? My client is WMP 10.00.00.4058. Maybe there's some kind of setting on the server which tells files to loop, is that a crazy idea?

Upvotes: 1

Views: 5325

Answers (3)

jerebear
jerebear

Reputation: 6655

The issue, i believe, lies within your different embedding methods between the different browsers. Here's is some tested code where looping does not happen.

IE

<object id="contentPlayer" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="300" height="60"><!-- <param name='fileName' value=''> -->
<param name='animationatStart' value='false'>
<param name='transparentatStart' value='true'>
<param name='autoStart' value='true'>
<param name='playState' VALUE='1'>
<param name='loop' value='false'>
</OBJECT>

Firefox

<object id="contentPlayer" name='contentPlayer' type="application/x-ms-wmp" data="" width="300" height="60"><!-- <param name='fileName' value=''> -->
<param name='animationatStart' value='false'>
<param name='transparentatStart' value='true'>
<param name='autoStart' value='true'>
<param name='playState' VALUE='1'>
<param name='loop' value='false'>
</OBJECT>

The primary difference being that in IE I have a classid but in Firefox I have a "type" classification

Upvotes: 1

Billiam
Billiam

Reputation:

WTH! param name=PlayCount value=1

Upvotes: 2

plan9assembler
plan9assembler

Reputation: 2984

compare your html code with this:

stolen from http://www.programmingforums.org/post147977.html

<object width="320" height="290"
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
id="mediaplayer1">
<param name="Filename" value="kids.mpg">
<param name="AutoStart" value="True">
<param name="ShowControls" value="True">
<param name="ShowStatusBar" value="False">
<param name="ShowDisplay" value="False">
<param name="AutoRewind" value="True">
<embed
type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/"
width="320" height="290" src="/support/dreamweaver/ts/documents/kids.mpg"
filename="kids.mpg" autostart="True"
showcontrols="True" showstatusbar="False"
showdisplay="False" autorewind="True">
</embed>
</object>

Upvotes: 0

Related Questions