Daniel
Daniel

Reputation: 2014

swfobject embed youtube elastic videos height issue

Im having trouble making my embedded videos from youtube elastic. I tried more or less everything i could think of, and im running out of ideas.

As the code shows below i have 2 html block tags with 2 different id´s which i put the video int he last, the placeholder. I tried the width and height tricks suggested by: http://webdesignerwall.com/tutorials/css-elastic-videos

But none so far have worked.

It will get elastic in the width, but the height dosent follow. So in terms its elastic but only in the width :I

Anyone knows a solution, what did i miss? :)

        //create video area
        var $videoDisplay = $('<section id="video-display"></div>');
        var $videoPlaceholder = $('<div id="video-placeholder"></div>');

        $videoDisplay.insertAfter('#title-search-container');
        $videoDisplay.append($videoPlaceholder);

        $("#area").html($videoDisplay);


        //embed player
        swfobject.embedSWF('http://www.youtube.com/e/' + id + '?enablejsapi=1&playerapiid=ytplayer', 
        'video-placeholder', '100%', '100%', '9.0.0', null, null, { allowScriptAccess: "always" }, 
        { id: "myyoutubeplayer" } );

Upvotes: 0

Views: 223

Answers (1)

Gurpreet Singh
Gurpreet Singh

Reputation: 21233

Try this CSS:

#video-display {
   height: 100%;
}

instead auto;

Upvotes: 1

Related Questions