/
slidesEmbed.html
53 lines (33 loc) · 1.81 KB
/
slidesEmbed.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body style="background-color:<?= colorFondo ?>; margin: 0; padding: 0">
<!-- Mostrar presentación incrustada si publicación activada y ajustes inicializados -->
<? if (PropertiesService.getDocumentProperties().getProperty('publicar') == 'true' &&
PropertiesService.getDocumentProperties().getProperty('inicializado') == 'true' ) { ?>
<div id="marco1" style="display: block; position: relative; padding-bottom: <?= aspecto ?>%; height: 0; overflow: hidden; border: none;">
<iframe id="marco2" style="transition: opacity 1s; position:absolute; width: 100%; height: 100%; clip-path: inset(<?= insetSuperior ?>px <?= insetLateral ?>px <?= insetInferior ?>px <?= insetLateral ?>px)";
src="<?= url ?>?start=<?= iniciar ?>&loop=<?= repetir ?>&delayms=<?= msAvanzar ?>"
frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true">
</iframe>
</div>
<!-- Si intervalo de recarga = 0 no recargaremos nunca -->
<? if (PropertiesService.getDocumentProperties().getProperty('sRecargar') != '0') { ?>
<script>
setInterval(function(){
document.getElementById("marco2").style.opacity = 0;
sleep(1000).then(() => {document.getElementById('marco2').src="<?= url ?>?start=<?= iniciar ?>&loop=<?= repetir ?>&delayms=<?= msAvanzar ?>";});
sleep(<?= msFundido ?>).then(() => {document.getElementById("marco2").style.opacity = 1;});
}, <?= msRecargar ?>);
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
</script>
<? } ?>
<? } else {?>
<h1>La presentación no está disponible</h1>
<? } ?>
</body>
</html>