0

I need a help , youtube player not work. whats problem in there?????? when i put here new youtube video id then not showing in here. site link : cintv24 .net

my code is

/*

myYoutubePlaylist

WordPress Plugin by Jonk, http://jonk.pirateboy.net

Download from https://wordpress.org/plugins/my-youtube-playlist/

*/

//check for ie

ie = false;

if (document.all) {

var ie = true;

}

jQuery(document).ready(function() {

});

jQuery(window).load(function () {

myYoutubePlaylist_size();

});

jQuery(window).scroll(function () {

});

var timer;

jQuery(window).resize(function () {

timer = setTimeout(function () {

myYoutubePlaylist_size();

}, 500);

});

//a function to choose another youtube-video without reloading the page

function myYoutubePlaylist_cy(ytSrc,containerId,type,play) {

if (type == null || type == '') {

type = 'v';

}

document.getElementById(containerId).innerHTML = eval("myYoutubePlaylist_cf('',ytSrc,500,307,type,play)");

jQuery(this).addClass('myYoutubePlaylist_active');

myYoutubePlaylist_size();

}

//a function to load flashmovies. it also prevents ie from adding the ugly border

function myYoutubePlaylist_cf(FlashVars,movie,width,height,type,controls,play) {

if (play == 'play') {

play = '&autoplay=1';

} else {

play = '';

}

myYoutubePlaylist_cfStr = '<obj' + 'ect width="' + width + '" height="' + height + '" data="' + '//www.youtube.com/'+ type +'/'+ movie +'&hl=en&fs=1' + play + '" type="application/x-shockwave-flash">';

myYoutubePlaylist_cfStr += '<param name="movie" value="//www.youtube.com/'+ type +'/'+ movie +'&hl=en&fs=1&controls=1' + play + '"/>';

myYoutubePlaylist_cfStr += '<param name="allowFullScreen" value="false"/>';

myYoutubePlaylist_cfStr += '<param name="allowscriptaccess" value="always"/>';

//myYoutubePlaylist_cfStr += '<param name="FlashVars" value="'+ FlashVars +'">';

myYoutubePlaylist_cfStr += '<embed src="//www.youtube.com/'+ type +'/'+ movie +'&hl=en&fs=1'+ play +'" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '" allowscriptaccess="" allowfullscreen=""/>';

myYoutubePlaylist_cfStr += '<' + '/object>';

return myYoutubePlaylist_cfStr;

}

//a function to load all movies with thumbs to a list

function myYoutubePlaylist_dl(allVideos,containerId,targetContainerId) {

allVideosArr = allVideos.split(', ');

if (allVideosArr.length > 1) {

allVideosLi = '<ul class="myYoutubePlaylist_Ul" >';

for (var i=2; i < allVideosArr.length; i++) {

thisLink = 'javascript:myYoutubePlaylist_cy(\''+allVideosArr[i]+'\',\''+targetContainerId+'\',\'\',\''+'play'+'\');'

allVideosLi += '<li>' + '<a href="'+thisLink+'">' + '<span class="myYoutubePlaylist_Img" style="background-image:url(\'//i.ytimg.com/vi/'+allVideosArr[i]+'/mqdefault.jpg\');"></span>' + '</'+'a></'+'li>';

}

allVideosLi += '</ul><div class="myYoutubePlaylist_clearer"></div>';

document.getElementById(containerId).innerHTML = allVideosLi;

} else {

document.getElementById(containerId).style.display = 'none';

}

}

function myYoutubePlaylist_size() {

jQuery('.myYoutubePlaylist iframe, .myYoutubePlaylist object').each(function( index ) {

thisW = jQuery(this).attr('width');

thisH = jQuery(this).attr('height');

thisR = thisH / thisW;

thisW = jQuery(this).parent().parent().width();

thisH = jQuery(this).parent().parent().width()*thisR;

jQuery(this).css('width', thisW);

jQuery(this).parent().css('width', thisW);

jQuery(this).css('height', thisH);

jQuery(this).parent().css('height', thisH);

jQuery(this).parent().parent().find('.myYoutubePlaylist_YoutubePlaylist').css('width', thisW+3);

thisThmb = jQuery(this).parent().parent().find('.myYoutubePlaylist_YoutubePlaylist ul.myYoutubePlaylist_Ul li a span');

thisThmbW = thisThmb.width();

thisThmb.css('height', thisThmbW*0.75);

});

}

where is problem , full screen mode on/off not working
  • please help me , very important for me – abdullahsk Mar 15 at 9:31
  • "where is problem , full screen mode on/off not working" - you've got two different ways of embedding the video here: one has <param name="allowFullScreen" value="false"/> and the other allowfullscreen="". What do the YouTube docs say about these? Do they both need to be true? – Rup Mar 15 at 11:37
  • But in general if you have a problem with a plugin you'd do better to ask the plugin authors directly since they'll know the code and how YouTube embedding works. – Rup Mar 15 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.