Solving Youtube-issues and speeding it up

Discussion in 'Computers' started by ekrem, Sep 23, 2011.

  1. ekrem
    Offline

    ekrem VIP Member

    Joined:
    Aug 9, 2005
    Messages:
    7,243
    Thanks Received:
    370
    Trophy Points:
    83
    Ratings:
    +375
    I've implemented in one of my websites.
    It is very simple and uses new embed codes of Youtube with <iframe>.
    There is only an image displayed, and once you click on that image the actual Youtube stuff is dynamically loaded on-demand.
    So, no Flash etc unless you klick the image, which speeds up page-generation time as only an image is displayed instead of full Flash-Videoplayer at beginning.


    1.
    This code you save e.g. "youtube.js" file and include it in header.
    <script type="text/javascript" src="http://www.usmessageboard.com/youtube.js"></script>





    2.
    Image:
    http://img691.imageshack.us/img691/3694/youtubeep.jpg


    In vbulletin you have to make new bbcode/shortcode.
    Maybe you have to modify it a little bit for Vbulletin, the "Replacement {param}" part. I don't use VBulletin.



    3.
    Now a user can embed Youtube this way:

    This image will be displayed
    [​IMG]


    And if image is clicked, Video and Flash is loaded from Youtube-Server on-demand and it replaces the Image:
    [youtube]GSeqvWvbKcA[/youtube]
     
    Last edited: Sep 23, 2011

Share This Page