forked from sonnylazuardi/mazmur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
show.html
208 lines (193 loc) · 5.35 KB
/
show.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>
Sembah Dia! Show
</title>
<link href="css/vendor/reveal.min.css" rel="stylesheet">
<link href="css/vendor/theme/default.css" id="theme" rel="stylesheet">
<link href="css/show.css" rel="stylesheet">
<script id="lirik-view-template" type="text/html">
<section>
<h3>
<%= lirik %>
</h3>
</section>
</script>
</head>
<body>
<div class="reveal" id="uploadBg0">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides" id="slide-view">
</div>
</div>
<div id="videoRearWrap">
<video id="videoRear" autoplay=""></video>
</div>
<div id="videoFrontWrap">
<video id="videoFront" loop="" muted="" autoplay=""></video>
</div>
<!-- <div id="imageWrap">
<div id="imageBg2">
</div>
<div id="imageBg">
</div>
</div> -->
<div id="additionalText">
<div id="dateTime">
<div id="date">
</div>
<div id="time">
</div>
</div>
<div id="place">
GBI PPL Citylink
</div>
<h1 id="centerBotText">
sembahDia!
</h1>
</div>
<div id="colorOverlay">
</div>
<div id="blackSlide">
</div>
<script src="js/vendor/jquery.min.js" type="text/javascript"></script> <script src="js/vendor/underscore-min.js" type="text/javascript"></script> <script src="js/vendor/jquery.cycle.all.min.js" type=
"text/javascript"></script> <script src="js/vendor/reveal.min.js"></script> <script>
var videoFile={};
var ganti={};
var frontBg=1;
var transitionSpeed='slow';
function setVideoFile(layer,file){
videoFile[layer]=file;
ganti[layer]=true;
}
function startTime() {
var namaHari=["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"];
var namaBulan=["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"];
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
m = checkTime(m);
s = checkTime(s);
document.getElementById('date').innerHTML = namaHari[today.getDay()]+", <b>"+today.getDate()+"<\/b> "+namaBulan[today.getMonth()]+" "+today.getFullYear();
document.getElementById('time').innerHTML = "<b>"+h+"<\/b>:<small>"+m+":<small>"+s+"<\/small><\/small>";
var t = setTimeout(function(){startTime()},500);
}
function checkTime(i) {
if (i<10) {i = "0" + i}; // add zero in front of numbers < 10
return i;
}
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
function reloadReveal() {
Reveal.initialize({
controls: false,
progress: false,
history: false,
keyboard:true,
center: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
});
}
function changeSlide(number) {
Reveal.slide(number, number, number);
}
function changeOverlay(rgbaCol){
$('#colorOverlay').css('background-color', rgbaCol);
}
function playPauseVid(layer){
if (ganti[layer]===true){
if(videoFile[layer]!==undefined);
changeBg(videoFile[layer],layer);
ganti[layer]=false;
}
else {
var video=$("#video"+layer).get(0);
if (video.paused){
video.play();
$("#video"+layer).fadeIn(transitionSpeed);
}
else
video.pause();
}
}
function changeCBText(text){
document.getElementById('centerBotText').innerHTML=text;
}
function stopVid(layer){
var video=$("#video"+layer).get(0);
if (video.readyState>0)
$("#video"+layer).fadeOut(transitionSpeed,function(){
video.pause();
video.currentTime=0;
});
}
function changeBg(file,layer) {
var fileURL = URL.createObjectURL(file);
if (file.type.indexOf('video/') != -1) {
$('#video'+layer).fadeOut(transitionSpeed,function(){
$('#video'+layer).attr('src', fileURL).load();
$('#video'+layer).fadeIn(transitionSpeed);
});
$("#video"+layer).bind('ended', function(){
$("#video"+layer).fadeOut(transitionSpeed);
});
}
}
function clearSlide(status) {
if (status)
$('.slides').fadeOut(transitionSpeed);
else
$('.slides').fadeIn(transitionSpeed);
}
function blankSlide(status) {
if (status) {
$('#blackSlide').fadeIn(transitionSpeed);
} else {
$('#blackSlide').fadeOut(transitionSpeed);
}
}
function showDateTime(status) {
if (status) {
$('#additionalText').fadeIn(transitionSpeed);
} else {
$('#additionalText').fadeOut(transitionSpeed);
}
}
function showVideo(videoWrap,status) {
if (status) {
frontBg=1;
$(videoWrap).fadeIn(transitionSpeed);
} else {
frontBg=0;
$(videoWrap).fadeOut(transitionSpeed);
}
}
var PresenterApp = {
lirikData: [],
init: function(options) {
this.lirikData = options.lirikData;
this.$lirikView = $('#slide-view');
this.show(this.lirikData);
reloadReveal();
},
show: function(lirikData) {
var template = _.template($('#lirik-view-template').html());
var ctr = 0;
this.$lirikView.empty();
_.each(lirikData, function(baris) {
this.$lirikView.append(template(baris));
ctr++;
}, this);
},
}
$(document).ready(function () {
startTime();
PresenterApp.init({lirikData: window.opener.lirikData.toJSON()});
});
</script>
</body>
</html>