Bye Bye Embed

by Elizabeth Castro

54 Reader Comments

Back to the Article
  1. Great article but the whole object-in-an-object markup concept is just plain bad to me, and smells of the ol’ embed solution of olden days. Ive got a much simpler solution that works cross-browser and is xhtml compliant. Mine uses two object tag sets and display:none to hide one set based on the browser. One for IE active x and the other for all the others. Some special fixes as well, but uses simple CSS to show and hide each type for each browser. Works on MAC as well (IE and Safari), and works with Flash, Quicktime and any multimedia object you may have. Can even be used as a replacfement for the old iframe. Check it out when you get a chance and send comments:

    - thestormdetector

    Copy & paste the code below to embed this comment.
  2. I recently Goggled a problem I was having with the way my WMV files were opening on my site.
    I found this site”¦ 

    Ree: One object for Windows Media Player

    I just used his code and IMO it works GREAT!!
    GREAT!!”? being it opens the WMV’s the way I envisioned them opening!!



    Copy & paste the code below to embed this comment.
  3. The following properties are supported for use with the name attribute of the PARAM element. “Param tags”: All these work with IE and Media Player ActiveX plugin (the object with classid). Don’t use old deprecated Media Player 6.4 properties with Active-X plugin.

    In Parentheses is specified what you should use with NPAPI-plugin ie. in second object or embed for Firefox, Opera, Safari etc.

    Note also that according to specs autoStart is true by default so it is not necessary to specify it.

    • autoStart (OK, use 0 or 1 instead of false and true(default))
    • balance—-
    • baseURL—-
    • captioningID—- (Mozilla bug 293616)
    • currentPosition (Only works with local files or if the file is cached)
    • currentMarker (OK)
    • defaultFrame (OK)
    • enableContextMenu (OK, use 0 or 1 instead of false and true(default))
    • enabled (OK, use 0 or 1 instead of false and true(default))
    • fullScreen—-
    • invokeURLs (OK, use 0 or 1 instead of false and true(default))
    • mute (OK, use 0 or 1 instead of false(default) and true)
    • playCount (OK)
    • rate (OK)
    • SAMIFileName (OK)
    • SAMILang ?
    • SAMIStyle ?
    • stretchToFit—-
    • uiMode—- (none = set ShowControls to 0), (mini = set ShowPositionControls to 0), (full(default) set ShowStatusBar to 1)
    • URL—- (Use fileName)
    • volume—-
    • windowlessVideo—-

    —- = Not supported in browsers(Firefox, Opera, Safari etc.) which use “NPAPI”: -plugin . Also JavaScripting doesn’t work with NPAPI-plugin (blaim Microsoft).

    It is good practise to provide additional download link.
    Check that your server actually serves correct MIME-types. “MIME Type Settings for Windows Media Services”:

    Copy & paste the code below to embed this comment.
  4. I have used the object tag to inlcude a Flash video (.FLV) and it seems to work well. Maybe Flash video is the way to go – more people have the plug-in and progressive download means the entire file doesn’t have to be downloaded at once.

    If you are using QT you need to provide alternatives which could be confusing for the user. I am not sure whether Flash video will be more accessible though – it will need more testing.


    Copy & paste the code below to embed this comment.
  5. The version that is supposed to work ( shows a completely blank page in my Safari 2.0.4.

    Copy & paste the code below to embed this comment.
  6. Strange. Both test versions wouldn’t stream in FF (on winXP) until they fully loaded, then they played fine.

    But the final for standards loving browsers version actually crashed my FF; this is the very first time that my FF has crashed.

    I don’t want to know why the it crashed my FF. It did. Period. I lost all my open tabs (including a lengthy, unposted, reply to someone on why their page was blowing up (because among other reasons, they had used the <embed> tag!). If the solution here crashed on me, it may crash on one of my visitors … I can’t take the risk of lost respect or patronage.

    There has been a problem with replacing the damn <embed> tag with a valid “cross-browser-perform-as-intended” <object> tag for over five years now and it seems as if the problem still exists.

    As a standards compliant web coder, I often wonder why I bother fighting with tableless css layout to make them cross browser compliant, when tables were simply so much easier (most likely because I resent MS arrogance). Much of the time the box model hacks don’t work as expected (or IE keeps finding a way to occasionally blow up my layout just for spite).

    And now, trying to find a valid replacement for the <embed> tag is also turning into the same kind of frustrating hit or miss art project. With many brilliant mad scientists’ experiments out there that work most of the time for most of the people and some of the time for some of the people yet hardly ever for a few poor saps.

    There will eventually be a true working solution. Until then, I applaud those who keep trying. So <“embed” sound of applause>. But back to the drawing board.

    Copy & paste the code below to embed this comment.
  7. I’m having most difficulties getting Windows Media to play in Firefox, especially if I don’t want the video to autostart. There is also problems getting ASX files played among all browsers. Pointing directly to the WMV file usually works fine, but if you wrap it in an ASX file, I’ve found the content type ‘video/x-ms-asf’ to work better than the ‘video/x-ms-wmv’ proposed in this article.

    And either way, I can’t find a way to display WMP’s controls in Firefox, so if you manage to get ‘autostart=0’ to be respected, there’s no way to actually start the video since there’s no play button. Frustrating.

    Copy & paste the code below to embed this comment.
  8. I tried to implement this technique to embed an IFRAME content while not using the iframe element. I spent quite a few hours in doing this and came home with some results, and a lot of informations on how current UA deals with supposed standards.

    If you are interested, find the post here:

    Copy & paste the code below to embed this comment.
  9. I’ve tried to use the <object> non ActiveX solution and worked just fine with IE 6 in WinXP. But with Firefox I could’nt make to work with the status bar. I’ve used and it didn’t work in Firefox. I’ve also tried , but it didn’t work also. This parameter didin’t work with either Firefox and IE 6, both WinXP.

    Copy & paste the code below to embed this comment.
  10. Robson,
    With IE use ActiveX and with other browsers use NPAPI. And remember to use conditional comments especially since some Firefox users might have unofficial ActiveX plugin(ax in user-agent string)

    <!—[if IE]>
      <object id=“WMP” classid=“CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6” width=“320” height=“300”>
    <!—[if !IE]> <—>
    <object id=“WMP” type=“video/x-ms-wvx” width=“320” height=“300”>
      To view the movie you need media player that supports Windows Media format×31_static.gif</a>

      View / Download MyMovie (size) [WMV]
    <!—> <![endif]—>

    Copy & paste the code below to embed this comment.
  11. code get messed <IE]> should read < ! – - [ i f ! I E ] > without extra spaces.

    Copy & paste the code below to embed this comment.
  12. I’m at my wits end… I have used every code I know to embed a WMV file on my splash page, yet it keeps appearing with the controller, even though I have controller=false in my code. (C:\Websites\CHLBI\chl_splash1.htm)

    It works fine with my MOV page.(C:\Websites\CHLBI\chl_splash2.htm)

    <embed src=“layout/Layout2006/Animation/CHL2.wmv” width=“600” height=“400” ‘c’, ‘’,></embed>

    Any help would be GREATLY appreciated!

    Copy & paste the code below to embed this comment.
  13. <rant>

    Well, I now have a hybrid of the Castro method and the Apple method….and I’m begingin to loose control of things!

    All was going well – even IE 6.0.29 with SP2 under Win XP Pro was behaving (as was Safari 2.04, FF & IE 5.2 all under Mac OS X)! Then I installed FF 2.0 under Win XP Pro – and now I’m back to square 1 with pormpts to install stuff!

    It seems as soon as you fix this for one bunch of browsers, and begin testing on the next – the bubble pops. Is there a definitive version of the code structure out there will enable the embedding of MP3 files with a controller, without having to click through a thousand dialogues and sign your life away? Is it really that much to ask for?



    Copy & paste the code below to embed this comment.
  14. Anyone come across the problem with scrolling embedded videos within scrollable DIVs?

    I have embedded a video (youtube,google) within a scrollable DIV and upon viewing them on the mac browsers — Safari, Opera, OmniWeb and InternetExplorer, it produces an undesired effect.

    Firefox seems to be an exception, but the browsers mentioned above doesn’t recognise the boundaries of the DIV. So the video is not hidden at all within the confines, and when you scroll down to view the rest of the content underneath, a ghost image of the video remains..

    Here is a link for a simple demo

    The coding is straight forward. I just want to know if this is a known issue, if so are there any methods around it.. (searching the web has been to no avail). Also are PC users experiencing the same?

    Copy & paste the code below to embed this comment.