Skip to content

Instantly share code, notes, and snippets.

@marcosfreitas
Last active December 28, 2015 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcosfreitas/21776d98abf663e37e67 to your computer and use it in GitHub Desktop.
Save marcosfreitas/21776d98abf663e37e67 to your computer and use it in GitHub Desktop.
var arr_links = new Array();
function iFrame (tbody, i){
arr_links.push(tbody.find('iframe').find('flideo').find('video'));
console.info(arr_links[i]);
};
/* PARTE 0 */
var sNew = document.createElement("script");
sNew.async = true;
sNew.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js";
var s0 = document.getElementsByTagName('script')[0];
s0.parentNode.insertBefore(sNew, s0);
/* PARTE 1 */
var html_vimeo = "";
var html_youtube = "";
var html_portal = "";
video_ids = new Array(125491471, 129269218, 126863876, 127181987, 129308959, 129323593, 127184098, 127303257, 127320615, 127304282, 127637946, 127637948, 128164681, 128173723, 128282138, 128286812, 129317818, 128503812, 128510548, 129319309, 129263868, 129271229, 129272441, 129273486, 129274948, 129276219, 129321266, 129323094, 129295924, 129298495, 129306207, 126863879, 127176336, 127297776, 128137125, 128270490, 128473258, 130255285, 130693644, 130707741, 130763927, "Rtho-XuVpyo", "3aKp_J2xP-Y", "ueejT3PjXJA", "wcHmAr7HfTY", "WE3juExksc");
$.each(video_ids, function(i, ID){
strID = ID+"";
if(!isNaN(ID) && strID.length === 9){
html_vimeo +='<iframe id="'+i+'" src="//player.vimeo.com/video/'+ID+'" width="960" height="400" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
}else if(strID.length === 11){
html_youtube +='<iframe id="'+i+'" width="960" height="400" src="//www.youtube-nocookie.com/embed/'+ID+'?rel=0" frameborder="0" allowfullscreen></iframe>';
}else{
html_portal +='<div id="'+i+'" class="clearfix"></div><script type="text/javascript" src="https://www.construir.arq.br/wp-content/themes/tema-construir/js/player/jwplayer.js"></script><script type="text/javascript">jwplayer("mediaplayer").setup({flashplayer: "https://www.construir.arq.br/wp-content/themes/tema-construir/js/player/player.swf",file:"../../../../../imagem/cursos/'+ID+'",width:"960px",height:"400px"});</script>';
}
});
$('body').html(html_vimeo+html_youtube);
/* PARTE 2 */
for (var i = 0; i <= video_ids.length-1; i++) {
$('iframe').each(function(i, v){
console.info($(this).find('.flideo').html());
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment