function RecuperaCodigo(){for(var o=document.location.toString().toLowerCase(),e=o.split("/"),n=0;n<e.length;n++)e[n].indexOf("codeitem")>-1&&(codigo=e[n].substr(e[n].indexOf("codeitem")+8))}function NormalizaJson(o){for(var e in o)o[e]instanceof Object&&(o[e].__cdata||""==o[e].__cdata?o[e]=o[e].toString():NormalizaJson(o[e]))}function CarregaAleatoriamente(o){var e=randomIndex=Math.floor(Math.random()*o.length),n=o[e];return defineTipoDoItem(n),n}function CarregaSequencialmente(o,e){var n=window.localStorage.getItem(e+codigo);n||(n=0),n>=o.length&&(n=0);var t=o[n];return n++,window.localStorage.setItem(e+codigo,n),defineTipoDoItem(t),console.log(t),t}function defineTipoDoItem(o){o.tipo="texto",o.chaVideo?o.tipo=o.chaVideo.indexOf(".mp4")>=0?"video":"imagem":o.chaImagens&&(o.tipo="imagem")}function relativeLinkToAbsolute(o){var e="";if(console.log(o),window.location.toString().indexOf("http://")<=-1){e=window.location.toString();var n="/arquivos/",t=(n.length,e.indexOf(n));e=e.substring(0,t),console.log(e)}if(o&&""!=o.toString()){var i=e+o;return console.log(i),i}}function RandomNumber(){return Math.floor(99999*Math.random())}var nucleomediaApi=angular.module("nucleomediaApi",[]),codigo="";RecuperaCodigo(),nucleomediaApi.factory("nucleomediaRequest",["$http",function(o){return{get:function(e,n){o.get(e,{transformResponse:function(o){var e=new X2JS,n=e.xml_str2json(o);return n}}).success(function(o,e){n(o)})}}}]),angular.module("nucleomediaApi").filter("trustUrl",["$sce",function(o){return function(e){return console.log(e),o.trustAsResourceUrl(e)}}]);
function RecuperaCodigo(){for(var o=document.location.toString().toLowerCase(),e=o.split("/"),n=0;n<e.length;n++)e[n].indexOf("codeitem")>-1&&(codigo=e[n].substr(e[n].indexOf("codeitem")+8))}function NormalizaJson(o){for(var e in o)o[e]instanceof Object&&(o[e].__cdata||""==o[e].__cdata?o[e]=o[e].toString():NormalizaJson(o[e]))}function CarregaAleatoriamente(o){var e=randomIndex=Math.floor(Math.random()*o.length),n=o[e];return defineTipoDoItem(n),n}function CarregaSequencialmente(o,e){var n=window.localStorage.getItem(e+codigo);n||(n=0),n>=o.length&&(n=0);var t=o[n];return n++,window.localStorage.setItem(e+codigo,n),defineTipoDoItem(t),console.log(t),t}function defineTipoDoItem(o){o.tipo="texto",o.chaVideo?o.tipo=o.chaVideo.indexOf(".mp4")>=0?"video":"imagem":o.chaImagens&&(o.tipo="imagem")}function relativeLinkToAbsolute(o){var e="";if(console.log(o),window.location.toString().indexOf("http://")<=-1){e=window.location.toString();var n="/arquivos/",t=(n.length,e.indexOf(n));e=e.substring(0,t),console.log(e)}if(o&&""!=o.toString()){var i=e+o;return console.log(i),i}}function RandomNumber(){return Math.floor(99999*Math.random())}var nucleomediaApi=angular.module("nucleomediaApi",[]),codigo="";RecuperaCodigo(),nucleomediaApi.factory("nucleomediaRequest",["$http",function(o){return{get:function(e,n){o.get(e,{transformResponse:function(o){var e=new X2JS,n=e.xml_str2json(o);return n}}).then(function(o,e){n(o.data)})}}}]),angular.module("nucleomediaApi").filter("trustUrl",["$sce",function(o){return function(e){return console.log(e),o.trustAsResourceUrl(e)}}]);

Update nucleomediaApi.js