Skip to:
Content
Pages
Categories
Search
Top
Bottom

how to embed YouTube-Video into main Blog ?


  • abcde666
    Participant

    @erich73

    I am probably too dumb and this might also be not the right forum, however I am not able to embed YouTube-Videos into the main-Blog (Admin-Blog) of my WPMU+BP website.

    I have the latest WPMU + latest BP-versions installed.

    When I click onto “Add Media” within the Dashboard, then I am able to create a Link to the Video, but somehow I can not embed the Video.

    Am I blind or what ?

Viewing 5 replies - 1 through 5 (of 5 total)

  • abcde666
    Participant

    @erich73

    ok, got it.

    Just paste the YouTube URL into the editor.

    However, pasting the “Embed-Code” into the Editor does not work……


    Boone Gorges
    Keymaster

    @boonebgorges

    If you’re going to use embed code, you have to make sure that (a) you’ve switched the editor to HTML (rather than Visual) mode, and (b) that you’ve added embed and object to your allowedtags array, either through a plugin that allows such code or through a custom function.

    Using the oEmbed method (where you just paste the URL on its own line of the editor) is a far easier solution!


    gpo1
    Participant

    @gpo1

    I use this plugin: Smart Youtube


    abcde666
    Participant

    @erich73

    I just recognized that at the end of each YouTube-Video (when the Video ends playing), it shows links at the right side like “Embed” and “URL” on the Video-screen.

    Do you know how to get rid of those links within the Video ?

    Many thanks !

    The embed element is deprecated in XHTML 1.0. Only Netscape needed it (R.I.P.).

    This element will invalidate your markup. But then so will a lot of other WP output.

    YouTube video links are troublesome, but once you get it figured it’s easy to knock up a template where you can just paste-in the URL. If your site always shows videos at the same size, write a simple PHP function that accepts the ID of the video as a parameter (in the snippet below, thats ‘uOzrZMhf7Ig’).

    Here’s an example I know works:

    <object width="425" height="344" type="application/x-shockwave-flash" data="http://www.youtube.com/v/uOzrZMhf7Ig&hl=en&fs=1&rel=0&border=1">

    <param name="movie" value="http://www.youtube.com/v/uOzrZMhf7Ig&hl=en&fs=1&rel=0&border=1" />

    <param name="allowFullScreen" value="true" />

    <param name="allowscriptaccess" value="always" />

    </object>

    The data attribute on the object is required. The allowFullScreen parameter is required if you use the &fs=1 (enable full-screen button) query arg.

    Notice also that the query args are escaped.

    A very useful page – YouTube APIs and Tools – YouTube Embedded Parameters.

    HTH

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to embed YouTube-Video into main Blog ?’ is closed to new replies.
Skip to toolbar