• I use wordpress 2.5.1. I am trying to embed youtube videos using the “Add Video” button in wordpress, but it just doesn’t get added. I did it the hard way of copying the embed html from youtube and pasting it in the post. I also can’t add the videos I upload from my computer. Can anyone tell what’s happening?????

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey litetaker, to embed videos from YouTube, copy the code that YouTube provides for “embed.”
    Edit the page/post you want to embed the video on, and make sure you’re viewing the “Code” or “HTML” (depending on your version of WP) panel. Now, when you paste the code from YouTube, delete the very last “object” tag.

    For example, here’s some YouTube embed code for one of my recent videos.

    <object width="425" height="344"><param name="movie" value="https://www.youtube.com/v/pnfWwGhYr9Q&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="https://www.youtube.com/v/pnfWwGhYr9Q&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object>

    WordPress doesn’t like this. Delete the “</object>” term so you actually paste this code:

    <object width="425" height="344"><param name="movie" value="https://www.youtube.com/v/pnfWwGhYr9Q&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="https://www.youtube.com/v/pnfWwGhYr9Q&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed>

    Hope this helps!

    Just change that video embed from YouTube to some nice, clean XHTML:

    <object class='left' type='application/x-shockwave-flash' data='https://www.youtube.com/v/pnfWwGhYr9Q' width='298' height='250'>
    	<param name='movie' value='https://www.youtube.com/v/pnfWwGhYr9Q' />
    	<param name='wmode' value='transparent' />
    </object>
    observethebanana

    (@observethebanana)

    I am having trouble getting this “clean XHTML” thing. By changing the code to adhere to a standard (and removing embed) you are limiting the number of people who can see your post. The fact is that the object tag does not work correctly (in Firefox or old browsers) on all machines. You are choosing standards compliance over compatibility, which is fine if that is your choice. My problem is that somewhere the decision was made that wordpress would change an authors’ post to enforce compliance over compatibility, regardless of the wishes of the author. Even using the “code” tag does not stop it from removing the embed tag and limiting ones audience. Shouldn’t there be an easy way around this for people who value maximum possible compatibility over standards compliance?

    The question of course, is why does the object tag work on some machines and not others, running the same browser?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t Embed ANY video in wordpress’ is closed to new replies.