I'm using the following code to display a YouTube video.
<object width="425" height="344">
<param name="movie"
value="**URL**">
</param>
<param name="allowFullScreen"
value="true">
</param>
<embed src="**URL**"
type="application/xshockwave-flash"
allowfullscreen="true"
width="425"
height="344">
</embed>
</object>
It works in Firefox, but why doesn't it in Internet Explorer?
I'm a totally new to web development, so I'm running into all these wonderful inconsistencies that you veterans are used to ;)
To elucidate, it doesn't work because the object
tag is incomplete. Firefox gives up on the object
element and uses the fallback old-school embed
element instead. IE doesn't support embed
so you get nothing.
An object
element must at least have a type
attribute telling it what plugin to use and a data
attribute telling it what to send the plugin. In IE you also need to mirror the data
attribute in a <param name="movie">
value inside the object because it runs plugins differently.
IE won't ‘stream’ partially-loaded Flash files this way though. To get that, you have to use an ActiveX classid
instead of the type
to tell it which plugin to use. If you care about this (and you might not: for small files, stub loaders, and files that are useless until complete, it makes no difference) then you have to start serving combinations of nested objects or embeds, which quickly becomes confusing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With