Forums

Adding video with object + embed (22 posts)

  1. modifiedcontent
    Member
    Posted 5 years ago #

    First, congratulations WordPress with 2.2! It's slick!

    I'm trying to put video in a post using a very straightforward method; simply adding the <object> code under the text code.

    The video shows up fine. It works. But it messes up the entire page structure and I can't figure out why. The video ends up in the upper right corner and the flow of the page is broken.

    In the source code I don't see any </div> or whatever that shouldn't be there. Is there something in CSS that does something with <object> or <embed> or other elements of the flv embed code? I can't find it...

    Is there a way to include the embed code "in isolation" so it doesn't interfere with the structure of the page? I've tried putting it in a <div></div>, but the editor didn't allow that. Putting it in <p></p> had no effect.

    I'm not looking for complicated plugins to include YouTube video or whatever.

    Any help very much appreciated!

  2. whooami
    Member
    Posted 5 years ago #

    dont use the editor, and dont use code. thats NOT what code is for, its for code.

    Use the plain old editor, and use proper markup.

    or use a plugin.

    and maybe try searching?

    http://wordpress.org/search/embed+a+swf+object?forums=1

    It isnt like this has never been talked about. :(

  3. hthth
    Member
    Posted 5 years ago #

    Try this markup:

    <object width="400" height="329" type="application/x-shockwave-flash" data="http://www.youtube.com/v/f2XQ97XHjVw"><param name="movie" value="http://www.youtube.com/v/f2XQ97XHjVw" /><param name="wmode" value="transparent" /></object>
  4. modifiedcontent
    Member
    Posted 5 years ago #

    whooami, it's always hard to guess which keywords to use to get the right results. Many of the posts on this subject have no answer anyway.

    I shouldn't have to turn off the editor for something as simple as this. Why is the object code wrong for the code tab? How is it not proper markup?

    Here's the full "code" that I'm trying to put in the post:
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="352" height="300"><param name="movie" value="http://website.com/video/flvplayer.swf?file=http://website.com/video/vids/movie.flv&amp;autoStart=false;" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="http://website.com/video/flvplayer.swf?file=http://website.com/video/vids/movie.flv&amp;autoStart=false;" quality="high" wmode="transparent" width="352" height="300" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>

    I've done a little search on WP video plugins, but most seem to be for YouTube and crap that I don't need. If there is a simple plugin that does what I need here, please someone let me know.

  5. whooami
    Member
    Posted 5 years ago #

    Im not going to debate what you should or shouldnt have to do for something so simple. You asked what to do, I replied.

    thats not proper markup because you are using embed tags.

    Apologies for the code button remark - i misunderstood and thought you were putting it in between <code> tags from the quicktags menu.

    Using that, in conjunction with the proper markup (hthth provided an example) shouldnt give you any trouble.

    Plugin:

    http://wordpress.org/extend/plugins/vipers-video-quicktags/

  6. modifiedcontent
    Member
    Posted 5 years ago #

    thats not proper markup because you are using embed tags.

    I know the embed tag is not valid anymore, but I believe some browsers still require it. Anyway if I take it out, the video doesn't show up in Firefox. The markup I have is as proper as it gets. Unfortunately embedding video is still a messy area.

    So apparently the editor "cleans up" the code. Why does it even do that? It's great for the WYSIWYG part of the editor, but why can't it just leave the "code" in the code tab alone?

    The plugin link you gave me is another one of those plugins that simplify posting videos from YouTube etc. That's not what I want to do here.

  7. whooami
    Member
    Posted 5 years ago #

    yes it does I dont use the embed tag on my site, and ALL my movies display in firefox :)

    if you are comfortable using a suggestion thats not a plugin and handles flvs flawlessly, I recommend flowplayer (standalone)

    http://flowplayer.sourceforge.net/

    Fwiw, there are plenty of people that dont use plugins to do this, I just plugged in hthth's sample code exactly as it was displayed, using the code tab, and I see my video plain as day, in firefox, ie6 and ie7.

    http://bigbox.village-idiot.org/

  8. modifiedcontent
    Member
    Posted 5 years ago #

    Thanks for the Flowplayer suggestion. Looks interesting.

    I've tried hthth's markup, replacing the youtube link with the long local url including the player. And it works in both Firefox and IE.

    Thanks!!

  9. modifiedcontent
    Member
    Posted 5 years ago #

    Last comment: The editor keeps moving this code outside the <object> tag. It's probably very compliant with something, but still annoying as hell:

    <param name="movie" value="http://website.com/video/flvplayer.swf?file=http://website.com/video/vids/movie.flv&amp;autoStart=false;"></param>
    <param name="wmode" value="transparent"></param>
  10. whooami
    Member
    Posted 5 years ago #

    try changing those to self-closing tags see if that helps

    <param name="movie" value="http://website.com/video/flvplayer.swf?file=http://website.com/video/vids/movie.flv&amp;autoStart=false;" />

  11. Gybe
    Member
    Posted 4 years ago #

    Hi guys,

    I come back on the topic...sorry.

    I've been trying to embed some flv stuff using Flowplayer (some app I really like and that I use on other websites) on a WP 2.2 blog plateform.

    Problems are :
    - it messes up everything even if I use the proper code given up this topic
    - I want to use the playlist stuff of Flowplayer and not a basic stand alone player...

    Any ideas ?

  12. Gybe
    Member
    Posted 4 years ago #

    I just found out where part of the problem comes from...

    I did a small mistake while coding that's why the layout was all turned up !

    Anyway I still have a problem with flowplayer...player loads but can't find video file , so if you have any clue ;)

  13. modifiedcontent
    Member
    Posted 4 years ago #

    This crap is still driving me mad. The editor messes up the code whatever variation I use. All available plugins seem to be overcomplicated "media editors" or only work for YouTube etc. Any other suggestions?

    BTW, Flowplayer is just a flash player. I have a simple but effective flash player, that's not the problem. The problem is that WordPress keeps screwing up the object tags.

  14. ccoupe
    Member
    Posted 4 years ago #

    Turn off all the "helpful" things. They often help too agressively if you know html/xhtml

  15. modifiedcontent
    Member
    Posted 4 years ago #

    ccoupe, there are some helpful things in the editor. It's a bit silly I have to throw out the child with the bath water. It would be nice if there was a way to just isolate a block of code from the editor's clean-up:

    <leave this></leave this>

    Is that impossible to do? As a plugin perhaps?

  16. Wixenstyx
    Member
    Posted 4 years ago #

    For what it's worth, it's happening to me too...and it's seriously pissing me off. I've gone in and unchecked the option to have WordPress 'helpfully' correct what it determines to be badly nested XML, and it's still putting </object> tags where they don't belong.

    Worst of all, it's not doing it consistently. When I save the post, it leaves it alone. When I reopen it again and save again, THEN it throws them in.

  17. mll
    Member
    Posted 4 years ago #

    Same here. Very annoying indeed.

  18. Slaydon
    Member
    Posted 4 years ago #

    Same here, in addition to removing line breaks and messing up with the code after posting. Unfortunately we wasted so much time with no solution, and we are considering to dump WP all over and switch to a more reliable CMS/blogging package.

    A key point in selecting a CMS solution is its editor's power and flexibility. If the latest version of WP cannot maintain our code and formatting and mess up our posts, then we don't need it!

  19. modifiedcontent
    Member
    Posted 4 years ago #

    Any progress on this? Has it been fixed in the latest version?

  20. miek
    Member
    Posted 4 years ago #

    I must say I find it ridiculous and a bit pathetic this still hasn't been fixed in 2.3.3. Also comments like "you googled with the wrong words, dumbass" are not very encouraging, considering that the issue is something that WP should have originally been able to handle.

    Other than that, I have been happy to notice WordPress seems to have significantly developed since the last versions.

  21. newonwp08
    Member
    Posted 4 years ago #

    I don't understand half of this discussion but I just checked the code I was trying to use and it includes both "embed" and "object" so it's possible my question is relevant (or maybe I need to start a new topic?)

    I happened on a video that I liked, decided to try the embed feature, went to 'write post' in my dashboard, clicked on the Code tab, pasted the code in there, selected Save and View, and it was amazing. The results looked great! Perfect. But that's not the end of it.

    After seeing the post previewed and how great it looked, I selected Publish. At which point, the published results were all out of whack. Video off to the right side, template visuals off kilter (Firefox). The whole page was messed up.

    Is that the same thing you all have been discussing? I don't know if this is the same problem or a different one. But I don't understand why it looks great in draft mode and publishes as a mess. I undid it and tried again a couple times with the same results.

    Any suggestions would be much appreciated, thanks!

  22. yilmazurgun
    Member
    Posted 4 years ago #

    Hi everyone, i am using JW player and i fixed the same issue by using this javascript object code:`<script type="text/javascript" src="http://www.jeroenwijering.com/embed/swfobject.js"></script>

    <div id="player">This text will be replaced</div>

    <script type="text/javascript">
    var so = new SWFObject('http://www.jeroenwijering.com/embed/player.swf','mpl','400','134','8');
    so.addParam('allowscriptaccess','always');
    so.addParam('allowfullscreen','true');
    so.addVariable('width','400');
    so.addVariable('height','134');
    so.addVariable('file','http://www.jeroenwijering.com/upload/statistics.xml');
    so.addVariable('displaywidth','140');
    so.addVariable('searchbar','false');
    so.write('player');
    </script>`

Topic Closed

This topic has been closed to new replies.

About this Topic