1 2 3 4 5function abrirIMG(imageUrl) { 6$("#descarga").attr('href', imageUrl); 7$("#imgs").removeAttr('src'); 8$("#imgs").attr('src', imageUrl); 9$('#imgs').removeAttr('hidden'); 10document.getElementById("pdfs").hidden = true 11 12}; 13 14function abrirPDF(e) { 15$("#descarga").attr('href', e); 16 17 18$("#pdfs").removeAttr('src'); 19$("#descarga").removeAttr('src'); 20 21if (window.location.protocol == "https:"){ 22e = e.replace("http://", "https://"); 23} 24$("#pdfs").attr('src', e); 25$('#targetDiv').append( $("#pdfs")); 26 27$("#descarga").attr('href', e); 28$('#targetDiv').append( $("#descarga")); 29 30$('#pdfs').removeAttr('hidden'); 31document.getElementById("imgs").hidden = true 32 33}; 34 35 36Node.prototype.hasClass = function (className) { 37 if (this.classList) { 38 return this.classList.contains(className); 39 } else { 40 return (-1 < this.className.indexOf(className)); 41 } 42}; 43 44Node.prototype.addClass = function (className) { 45 if (this.classList) { 46 this.classList.add(className); 47 } else if (!this.hasClass(className)) { 48 //var classes = this.className.split(" "); 49 //classes.push(className); 50 //this.className = classes.join(" "); 51 this.className += " " + className; 52 } 53 return this; 54}; 55 56Node.prototype.removeClass = function (className) { 57 if (this.classList) { 58 this.classList.remove(className); 59 } else { 60 //var classes = this.className.split(" "); 61 //classes.splice(classes.indexOf(className), 1); 62 //this.className = classes.join(" "); 63 this.className = this.className.replace(new RegExp('(?:^|\\s)'+className+'(?!\\S)'), ''); 64 } 65 return this; 66}; 67 68Node.prototype.toggleClass = function (className) { 69 if (this.classList) { 70 this.classList.toggle(className); 71 } else { 72 if (this.hasClass(className)) { 73 this.removeClass(className); 74 } else { 75 this.addClass(className); 76 } 77 } 78 return this; 79}; 80 81/* Adds Element BEFORE NeighborElement */ 82Element.prototype.appendBefore = function(element) { 83 element.parentNode.insertBefore(this, element); 84}, false; 85 86/* Adds Element AFTER NeighborElement */ 87Element.prototype.appendAfter = function(element) { 88 element.parentNode.insertBefore(this, element.nextSibling); 89}, false; 90 91/******** VIDEO JS *********/ 92 93// TODO 94videojs.Html5DashJS.hook('beforeinitialize', function(player, mediaPlayer) { 95 mediaPlayer.getDebug().setLogToBrowserConsole(false); 96}); 97 98function normalizeVideoPath(videoPath) { 99 videoPath.replace(/^\/|\/$/g, ""); 100 if (videoPath.indexOf("/") < 0) { 101 videoPath = "vod/" + videoPath; 102 } 103 return videoPath 104} 105 106function startVideoPlayer(id, videoPath, autoplay, poster) { 107 // validate 108 if (typeof id !== 'string' || typeof videoPath !== 'string' || typeof autoplay !== 'boolean') { 109 console.log("startVideoPlayer error: uno o mas parametros invalidos."); 110 return null 111 } 112 113 videoPath = normalizeVideoPath(videoPath); 114 115 // chequear que id pertenezca a un element de tipo video 116 var playerElement = document.getElementById(id); 117 if (playerElement === null) { 118 console.log("startVideoPlayer error: id '" + id + "' no pertenece a ningun elemento."); 119 return null; 120 } 121 if (playerElement.tagName !== "VIDEO") { 122 console.log("startVideoPlayer error: id '" + id + "' no pertenece a un elemento de tipo video."); 123 return null; 124 } 125 126 var player = videojs(id); 127 128 player.ready(function() { 129 player.src([ 130 { // DASH 131 src: 'https://argos.hcdn.gob.ar/' + videoPath + '/manifest.mpd', 132 type: 'application/dash+xml' 133 }, 134 { // HLS 135 src: 'https://argos.hcdn.gob.ar/' + videoPath + '/playlist.m3u8', 136 type: 'application/x-mpegURL' 137 }, 138 { // RTMP 139 src: 'rtmp://argos.hcdn.gob.ar/' + videoPath, 140 type: 'rtmp/mp4' 141 } 142 ]); 143 player.controls(true); 144 player.aspectRatio('16:9'); 145 player.autoplay(autoplay); 146 147 if(typeof poster != 'undefined' && poster && poster.length > 0) { 148 player.poster(poster); 149 } 150 }); 151 152 153 154 return player 155} 156 157function setAudioMode(id) { 158 videojs(id).aspectRatio('24:1'); 159} 160 161function pauseVideoPlayer(player) { 162 if (typeof player !== "undefined" && player !== null) { 163 player.pause(); 164 } 165} 166 167function playVideoPlayer(player) { 168 if (typeof player !== "undefined" && player !== null) { 169 player.play(); 170 } 171} 172 173function updateVideoPlayer(player, videoPath) { 174 videoPath = normalizeVideoPath(videoPath); 175 176 player.src([ 177 { // DASH 178 src: 'https://argos.hcdn.gob.ar/' + videoPath + '/manifest.mpd',
179 type: 'application/dash+xml' 180 }, 181 { // HLS 182 src: 'https://argos.hcdn.gob.ar/' + videoPath + '/playlist.m3u8', 183 type: 'application/x-mpegURL' 184 }, 185 { // RTMP 186 src: 'rtmp://argos.hcdn.gob.ar/' + videoPath, 187 type: 'rtmp/mp4' 188 } 189 ]); 190} 191 192function updateVideoPlayerImage(player, videoPath,image) { 193 videoPath = normalizeVideoPath(videoPath); 194 195 player.src([ 196 { // DASH 197 src: 'https://argos.hcdn.gob.ar/' + videoPath + '/manifest.mpd', 198 type: 'application/dash+xml' 199 }, 200 { // HLS 201 src: 'https://argos.hcdn.gob.ar/' + videoPath + '/playlist.m3u8', 202 type: 'application/x-mpegURL' 203 }, 204 { // RTMP 205 src: 'rtmp://argos.hcdn.gob.ar/' + videoPath, 206 type: 'rtmp/mp4' 207 } 208 ]); 209 210 player.poster(image); 211} 212 213function videoExists(videoPath) { 214 videoPath = normalizeVideoPath(videoPath); 215 videoPath = 'https://argos.hcdn.gob.ar/' + videoPath + '/manifest.mpd'; 216 var http = new XMLHttpRequest(); 217 http.open('HEAD', videoPath, false); 218 http.send(); 219 return (http.status != 404); 220}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.