Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Html code


  • Please log in to reply

#1
hary

hary

    Member

  • Member
  • PipPip
  • 94 posts
Can any one suggest the alteration I need to make to this code.

I am trying to stop the video clip playing automatically, but wait until the button is pressed.

It works ok with IE but not Firefox. I need it to work with both.
<embed width=340 height=280 type=application/x-mplayer2 autostart=false src=http://filehouse.fileave.com/simpson2.wmv></embed>

http://filehouse.fil.../practice2.html

Thankyou
  • 0

Advertisements


#2
Ax238

Ax238

    Tech Staff

  • Technician
  • 1,323 posts
Hello hary,

The <embed> tag has been deprecated. It would be better in the long run to use the <object> tag. You can then set up a parameter to keep the movie from autostarting:
<param name="autoStart" value="False">
See the following for more detailed setup information:
Embedding Windows Media Player WMV

Regards,

Ax
  • 0

#3
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
Actually, the embed tag is still needed for some browsers unless you use the complicated Satay Method.

You might want to set up your code using this simple code generator:

Embedded Media HTML Generator

You can get your code to validate with the embed tag, if you care about validation, by using JavaScript and its inherent problems with browsers that have JS turned off.

Ron
  • 0

#4
Ax238

Ax238

    Tech Staff

  • Technician
  • 1,323 posts
Hmmm, the Satay method seems to be used for flash, whereas the user is requesting assistance with embedding a WMV file.

As for support:
<embed /> Web Browser Support:
Netscape
Mozilla
Firefox
Internet Explorer
Opera
Safari
WebTV / MSNTV

<object> Web Browser Support:
Netscape
Mozilla
Firefox
Internet Explorer
Opera
Safari
XHTML 1.0: XHTML Client-Side Image Map Module, XHTML Object Module

Looks like pretty good support across the board.

The following should work, seems easy enough as well:
<object id='player' classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6' type='application/x-oleobject'>
<param name='FileName' value='URL TO WMV FILE' />
<param name="autoStart" value="False">
</object>

You won't need to use javascript at all with this method.
  • 0

#5
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
If you know what you're doing, you can adopt the methods in Satay for whatever.

Depending on file type, Firefox needs the embed tag, not object tags. The embed code generator is very useful for all types and you can just cut the embed tag out as needed.

Ron
  • 0

#6
Ax238

Ax238

    Tech Staff

  • Technician
  • 1,323 posts
Nice to have options isn't it? The following code will work in Firefox and IE, as well as other browsers:
<object id="player" type="video/x-ms-wmv" data="URL TO WMV FILE" width="320" height="260">
			<param name="src" value="URL TO WMV FILE" />
			<param name="autostart" value="false">
			<param name="controller" value="true" />
		</object>
Here's a nice reference page for embedded various media types in the object tag:
http://joliclic.free...ject-video.html
  • 0

#7
hary

hary

    Member

  • Topic Starter
  • Member
  • PipPip
  • 94 posts
Thank you very much for your ideas, I have tried everything and the following seems to

work in Ie/Firefox/Opera. I have kept it simple.

<center><embed src="http://filehouse.fileave.com/simpson2.wmv"autostart="0" 
type="application/x-mplayer2" wmode="transparent" width="340" height="280"></embed></center>

Autostart= 0 rather than = false made a difference.

http://filehouse.fil.../practice2.html
  • 0

#8
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts

Autostart= 0 rather than = false made a difference.

true/false are used with object tags. 1/0 are used with embed tag. BTW, there is no such thing as a closing embed tag (</embed>).

Ron

Edited by Major Payne, 10 February 2008 - 02:33 PM.

  • 0

#9
Ax238

Ax238

    Tech Staff

  • Technician
  • 1,323 posts
:) Glad you got it to work out :)
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP