var videos_arr=Array(); var vactual=Array(); var copetes_arr=Array(); var orden_arr=Array(); function siguiente(idnot, acortar_copete=false){ //alert(videos_arr[idnot][0]); //alert(videos_arr.length); if (vactual[idnot]<(videos_arr[idnot].length-1)) { vactual[idnot]++; //alert(youtubeid(videos_arr[idnot][vactual[idnot]])); var copete_yt = copetes_arr[idnot][vactual[idnot]]; /* fix para acortar el texto en el video de youtube si se meustra el boton de mas videos*/ if (acortar_copete) copete_yt = (copete_yt.length > 65) ? toLowerCaseWithOneUpper(copete_yt).substring(0, 64) + "..." : copete_yt; /*end fix*/ $("#aca_video_"+idnot).html(play(youtubeid(videos_arr[idnot][vactual[idnot]]))); $("#copete_yt_"+idnot).html(copete_yt); // $("#orden_yt_"+idnot).html(orden_arr[idnot][vactual[idnot]]); } } function anterior(idnot, acortar_copete=false){ if (vactual[idnot]>0) { vactual[idnot]--; var copete_yt = copetes_arr[idnot][vactual[idnot]]; /* fix para acortar el texto en el video de youtube si se meustra el boton de mas videos*/ if (acortar_copete) copete_yt = (copete_yt.length > 65) ? toLowerCaseWithOneUpper(copete_yt).substring(0, 64) + "..." : copete_yt; /*end fix*/ $("#aca_video_"+idnot).html(play(youtubeid(videos_arr[idnot][vactual[idnot]]))); $("#copete_yt_"+idnot).html(copete_yt); // $("#orden_yt_"+idnot).html(orden_arr[idnot][vactual[idnot]]); } } function youtubeid(url) { var ytid = url.match("[\\"); ytid = ytid[1]; return ytid; }; function play(id, height="288") { var autoPlay = ""; var showRelated = "&rel=0"; var showsearch= "&showsearch=0"; var showinfo= "&showinfo=0"; var fullScreen = ""; playerHeight= height; //playerWidth= '485'; playerWidth= '100%'; addThumbs= false; thumbSize= 'small'; showInline= false; optautoPlay= false; optshowRelated= true; optallowFullScreen=false; allowFullScreen= false; if(optautoPlay) autoPlay = "&autoplay=1"; if(optshowRelated) showRelated = "&rel=0"; if(optallowFullScreen) fullScreen = "&fs=1"; var html = ''; html += '<object height="'+playerHeight+'" width="'+playerWidth+'">'; html += '<param name="movie" value="https://www.youtube.com/v/'+id+autoPlay+showRelated+fullScreen+showsearch+showinfo+'"> '; html += '<param name="wmode" value="transparent"> '; if(optallowFullScreen) { html += '<param name="allowfullscreen" value="true"> '; } html += '<embed src="https://www.youtube.com/v/'+id+autoPlay+showRelated+fullScreen+showsearch+showinfo+'"'; if(optallowFullScreen) { html += ' allowfullscreen="true" '; } html += 'type="application/x-shockwave-flash" wmode="transparent" height="'+playerHeight+'" width="'+playerWidth+'">'; html += ''; return html; }; n4049