Youtube embed dimensions

enter image description here Ok, so basically I used the following Youtube Chanel embed code:

<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&amp;up_channel=tomdesigner777&amp;synd=open&amp;w=320&amp;h=390&amp;title=&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script>

And he inserts a tiny blue drawer of a video slideshow with a terrible blue background, but how can I make the video player a little bigger and change the back surface? ... the insert code does not allow me to do anything. Any help would be appreciated!

+3
source share
1 answer

Is it mandatory to use the Google module? You will not get much flexibility when making changes.

Why not use the YouTube API JSON response ? This way you can have full flexibility in getting the video you want using JavaScript.

JSON : https://gdata.youtube.com/feeds/api/users/tomdesigner777/uploads?v=2&alt=jsonc&max-results=5

Update

, YouTube. :

$(document).ready(function() {
    var randNumber = RandNo(1,5);

    $.ajax({
        type: "POST",
        url: "https://gdata.youtube.com/feeds/api/users/tomdesigner777/uploads?v=2&alt=jsonc&max-results=5",
        data: "{}",
        contentType: "application/json; charset=utf-8",
        dataType: "jsonp",
        success: function(result) {
            var data = result.data;

            $("#yt").html("<iframe width='560' height='315' src='http://www.youtube.com/embed/" + data.items[randNumber].id + "' frameborder='0' allowfullscreen></iframe>");
        }
    });
});

function RandNo(min,max) {
     return Math.floor(Math.random() * (max - min + 1)) + min;
}

: http://jsfiddle.net/sbhomra/kCSsX/

+2

All Articles