-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbeestvideo.html
863 lines (802 loc) · 40.1 KB
/
beestvideo.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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-152392632-3"></script>
<script src="js/pageHistory.js"></script>
<script src="js/helperFunctions.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="A simple element creator to generate responsive code that can be easily embbedded into Moodle">
<meta name="author" content="T&M">
<title>BEEST Video</title>
<link rel="icon" href="img/black favicon-16x16.png" type="image/gif">
<!-- external link to css file -->
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Arts CSS -->
<link rel="stylesheet" href="css/adminPlusSetuBlockStyle.css" />
<link rel="stylesheet" href="css/monashElements.css" />
<!-- external link to js file -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src=" https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<!-- Bootstrap js file -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<!-- FontAwesome js file -->
<script src="https://kit.fontawesome.com/3817feae52.js"></script>
<!-- Tinymce js file -->
<script src="https://beest.monash.edu/tinymce/tinymce.min.js"></script>
<script src="js/advancedModeLocalStorage.js"></script>
<!-- TinyMCE placeholder plugin file -->
<script src="js/placeholder.js"></script>
<script src="js/setupPage.js"></script>
<!-- Script to init the tinyMCE editor -->
<script type="text/javascript">
const START_ELEMENT = "<!--Begin BEEST video-->"
const END_ELEMENT = "<!--End BEEST video-->"
const DEFAULT_VIDEO_URL = "https://monash-panopto.aarnet.edu.au/Panopto/Pages/Embed.aspx?id=5d23c190-f6c6-405d-968b-abab0095e7a4";
var iconNames = {
"1":"video-camera",
"2":"play",
"3":"play-circle",
"4":"play-circle-o",
"5":"eye"
}
var videoPageInstance;
var localStorageHistory = "local_video"
$(document).ready(function() {
$('#respVidSwitch').on('input', embedLinkConverter);
setupToolTips(10000)
setupNav()
fullScreenToggle()
makeTinyWithID('tinyMCEvideo',{'change':generateCode},'[Placeholder for video context]')
setupGoogleAnalytics()
default_XRadio_onEmpty_Y("respVidHeading","headSize","noH","headSize1",generateCode);
/*REQUIRED FOR HISTORY*/
videoPageInstance = new videoPage()
initHistory();
/*END REQUIRED FOR HISTORY*/
});
//Get the window width dynamically
/* var width = $(window).width();
$(window).on('resize', function() {
if ($(this).width() !== width) {
width = $(this).width();
}
});
//Float the preview when the window size is large than 992
$(window).scroll(function () {
if($(this).scrollTop() > 50 && width > 992)
{
$('#preview').addClass('scrolling');
$('#preview').addClass('col-lg-6 mt-2');
$('#copy').removeClass('mt-5');
$('#previewDiv').removeClass('mt-2');
}
else {
$('#preview').removeClass('scrolling');
$('#preview').removeClass('col-lg-6 mt-2');
$('#copy').addClass('mt-5');
$('#previewDiv').addClass('mt-2');
}
}); */
/*REQUIRED FOR HISTORY*/
class videoPage{
constructor(link,context,position,width,heading,headingSize,icon){
this.link = link
this.context = context
this.position = position
this.width = width
this.heading = heading
this.headingSize = headingSize
this.icon = icon
}
toPDO(){
var obj = {}
for (var prop in this){
if (typeof(this[prop])!="function"){
obj[prop] = this[prop]
}
}
obj.mainHead = this.heading
return obj
}
toJSON(){return this.toPDO()}
fromObj(PDO){
for (var prop in PDO){
if (this.hasOwnProperty(prop)){
this[prop] = PDO[prop]
}
}
}
}
/*END REQUIRED FOR HISTORY*/
function writeinMoodle() {
tinyMCE.get('#id_introeditor').setContent(textOutput);
}
function updatePreview(resizedHead,vPosition,respVid,contextCode,vWidth){
function prepLeftRightAlignment(alignment,respVid_span,closeCol,secCol,contextCode_span){
if (alignment == "before"){
return respVid_span+closeCol+secCol+contextCode_span;
}
else if (alignment == "after"){
return contextCode_span+closeCol+secCol+respVid_span;
}
}
function updateIfDifferent(jQueryElement,value){
if (jQueryElement.html()!==value){
jQueryElement.html(value)
}
}
var reviewWidth=true;
var version = ""
var orderMapping = {"left":"before","right":"after","up":"before","down":"after"}
var alignOrder = orderMapping[vPosition]
switch(vPosition){
case "up":
case "down":
version = "v"
reviewWidth = false;
$('#widthRow').hide();
break;
case "right":
case "left":
version = "h"
reviewWidth = true;
$('#widthRow').show();
break;
}
var vertHorz = {
rowOpen:{v:"<div>",h:"<div class=\"row w-100\">"},
firstCol:{v:"<div id=\"uCol\">",h:"<div class=\"col-lg\" id=\"fCol\">"},
secCol:{v:"<div id=\"dCol\">",h:"<div class=\"col-lg mt-2\" id=\"sCol\">"}
}
var rowOpen=vertHorz.rowOpen[version]//"<div class=\"row w-100\">"
var closeCol="</div>"
var closeRow="</div>"
sizeClasses = {
"33":"col-lg-4",
"50":"col-lg"
}
var firstCol=vertHorz.firstCol[version]//"<div class=\"col-lg\" id=\"fCol\">"
var secCol=vertHorz.secCol[version]//"<div class=\"col-lg mt-2\" id=\"sCol\">"
//Change size of column if requested
if (reviewWidth){
if (vWidth == "33" && vPosition == "left"){
firstCol = firstCol.replace(sizeClasses["50"],sizeClasses["33"])
}
else if (vWidth == "33" && vPosition== "right"){
secCol = secCol.replace(sizeClasses["50"],sizeClasses["33"])
}
}
var textOutput = "<span id='resizedHead'>"+resizedHead+"</span>"+rowOpen
textOutput += "<span id='vPos' side="+vPosition+"></span>"
textOutput += firstCol
respVid_span = "<span id='respVidDemo'>"+respVid+"</span>"
contextCode_span = "<span id='video-context'>"+contextCode+"</span>"
textOutput += prepLeftRightAlignment(alignOrder,respVid_span,closeCol,secCol,contextCode_span)
textOutput+= closeRow
textOutput+= closeRow
var demoDiv = $('#demo')
//demoDiv.html("") //to force rewriting each time
if ((typeof(demoDiv.html()) !== "undefined") && (demoDiv.html().trim()!="")){
//if already created a demo, try to update as little as possible to min load time
var headHTML = $('#resizedHead')
var fColHTML = $('#fCol')
var fColClasses = fColHTML.attr('class')
var vPosHTML = $('#vPos')
var side = vPosHTML.attr('side')
var respVidHTML = $('#respVidDemo')
var sColHTML = $('#sCol')
var sColClasses = sColHTML.attr('class')
var contextCodeHTML = $('#video-context')
var oldWidth33 = ""
var oldWidth = ""
switch(side){
case "up":
case "down":
oldWidth = '100'
break;
case "right":
case "left":
oldWidth33 = (sColClasses.includes(sizeClasses['33']) || fColClasses.includes(sizeClasses['33']))
oldWidth = (oldWidth33 ? '33' : '50')
break;
}
//updateIfDifferent(fColHTML,firstCol) //fix me by changing class
if (side !== vPosition){
demoDiv.html(textOutput)
}
else{
updateIfDifferent(headHTML,resizedHead)
if (oldWidth !== vWidth){
if (vPosition == "left"){
fColHTML.toggleClass(sizeClasses["50"]+" "+sizeClasses["33"])
}
else if (vPosition== "right"){
sColHTML.toggleClass(sizeClasses["50"]+" "+sizeClasses["33"])
}
}
updateIfDifferent(respVidHTML,respVid)
updateIfDifferent(contextCodeHTML,contextCode)
}
}
else{
demoDiv.html(textOutput);
}
return textOutput;
//SelectAll("txtarearespVid");
//Add the html code after the div
}
/*BEGIN helper functions for generateElementCode*/
function constructHeading(vidHeading,headSize,faIconCode){
var resizedHead;
if(vidHeading == ""){
resizedHead = "";
}
else {
//Resizing the heading text
if (headSize == "noH"){resizedHead = ""}
else{
var sizes = {"h3":3,"h4":4,"h5":5}
resizedHead = '<div id=\"heading\"><h'+sizes[headSize]+">"+faIconCode+vidHeading+"</h"+sizes[headSize]+"></div>"
}
}
return resizedHead
}
function constructResponsiveIFrame(respLink){
var respVid="<div class=\"embed-responsive embed-responsive-16by9\"><iframe class=\"embed-responsive-item\" frameborder=\"0\" "
if (respLink.includes("youtu")){
respVid += "allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen"
}
else{
respVid += "allowfullscreen=\"\""
}
respVid += " src=\""+respLink+"\"></iframe></div>"
return respVid
}
function constructIconTag(faIcon){
//icon names moved to top
var iconName = iconNames[faIcon];
var faIconCode = "<i class=\"fa fa-"+iconName+"\"></i> ";
if (faIcon == "noI"){
faIconCode = "";
}
return faIconCode
}
/*END helper functions for generateElementCode*/
/*Function to generate and copy code for the responsive videos*/
function generateCode() {
// Get the HTML contents of the currently active editor
console.debug(tinyMCE.activeEditor.getContent());
//Retrieve the content by id of the tinyMCE textarea
var contextCode = tinyMCE.get('tinyMCEvideo').getContent();
var vidHeading = document.getElementById('respVidHeading').value;
var respLink = document.getElementById('respVidSwitch').value;
var vPosition = getRadioOption('videoPosition')
var vWidth = getRadioOption('videoWidth');
var headSize = getRadioOption('headSize');
var faIcon = getRadioOption('faCode');
videoPageInstance.link = respLink
videoPageInstance.context = contextCode
videoPageInstance.position = vPosition
videoPageInstance.width = vWidth
videoPageInstance.heading = vidHeading
videoPageInstance.headingSize = headSize
videoPageInstance.icon = faIcon
if (contextCode == ""){
contextCode = "[Placeholder for video context. The content you entered in step 2 will appear here.]";
}
if ((respLink == "")||(embedLinkConverter()==null)){
respLink = DEFAULT_VIDEO_URL;
}
var respVid=constructResponsiveIFrame(respLink)
var faIconCode = constructIconTag(faIcon)
var resizedHead = constructHeading(vidHeading,headSize,faIconCode)
//Change position of video and order of output
textOutput = updatePreview(resizedHead,vPosition,respVid,contextCode,vWidth)
document.getElementById('txtarearespVid').innerHTML=START_ELEMENT+textOutput+END_ELEMENT //update code displayed
}
function setPageContents(pageInstance){
dataToSave = {
'tinyMCEvideo':{type:"tiny",value:pageInstance.context},
'respVidHeading':{type:"basic",value:pageInstance.heading},
'respVidSwitch':{type:"basic",value:pageInstance.link},
'videoPosition':{type:"radio",value:pageInstance.position},
'videoWidth':{type:"radio",value:pageInstance.width},
'headSize':{type:"radio",value:pageInstance.headingSize},
'faCode':{type:"radio",value:pageInstance.icon}
}
setTextAreas_util(dataToSave)
generateCode();
}
function recoverCode(){
videoPageInstance = new videoPage()
var pastedHTML = $("#retrieveCode").val()
var iconHeading = getIconAndHeading(pastedHTML)
var iconClassName = iconHeading.iconName
var headSize = iconHeading.headSize
var headText = iconHeading.headText
var hasSideProp = false;
var hasFSCols = false;
var dataToFind = {
tags:['iframe'],
ids:['video-context','vPos','fCol','sCol']
} //if one is lg-4 then 33% else 50%
videoPageInstance.headingSize = headSize
videoPageInstance.heading = headText
if (iconClassName == null){
videoPageInstance.icon = "noI"
}
else{
var iconNums = reverseObjectMap(iconNames)
videoPageInstance.icon = iconNums[iconClassName]
}
var recoveredData = recoverFromPasted(pastedHTML,dataToFind)
videoPageInstance.link = recoveredData.tags.iframe[0].src
hasSideProp = (recoveredData.ids.hasOwnProperty("vPos"))
if (hasSideProp){
videoPageInstance.position = recoveredData.ids.vPos.attr('side')
videoPageInstance.context = recoveredData.ids['video-context'].text()
}
hasFSCols = ((recoveredData.ids.hasOwnProperty("fCol"))&&(recoveredData.ids.hasOwnProperty("sCol")))
if (hasFSCols){
colClasses = [recoveredData.ids.fCol[0].className,
recoveredData.ids.sCol[0].className]
colClasses[0] = colClasses[0].replace(/ .*/,"")
colClasses[1] = colClasses[1].replace(/ .*/,"")
videoPageInstance.width = (colClasses[0] == colClasses[1] ? 50 : 33)
}
else{
videoPageInstance.width = 50
}
if ((!hasSideProp)&&(hasFSCols)){
if ($(recoveredData.ids.fCol).find("iframe").length>0){
videoPageInstance.position = "left"
videoPageInstance.context = recoveredData.ids.sCol[0].innerHTML
}
else{
videoPageInstance.position = "right"
videoPageInstance.context = recoveredData.ids.fCol[0].innerHTML
}
}
if ((!hasSideProp)&&(!hasFSCols)){
throw new Error("BEEST video element is missing ids/tags to identify the position of video vs text context")
}
setPageContents(videoPageInstance)
}
function copyCode(){
/*REQUIRED FOR HISTORY*/
addToHistory(videoPageInstance)
/*END REQUIRED FOR HISTORY*/
SelectAll("txtarearespVid");
}
function SelectAll(id){
document.getElementById(id).focus();
document.getElementById(id).select();
document.execCommand("copy");
//window.alert('test');
}
function submitform()
{
document.forms["myform"].submit();
}
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
/*REQUIRED FOR HISTORY*/
function getHistoryI(index,history){
if (history.length>0){
var selectedItem = history[index]
videoPageInstance = new videoPage()
videoPageInstance.fromObj(selectedItem)
refToClassButton = videoPageInstance
setPageContents(refToClassButton)
generateCode()
}
}
/*END REQUIRED FOR HISTORY*/
var showingError = false
function embedLinkConverter(event){
var vidString = $('#respVidSwitch').val().toString();
var videoLink = null;
var vidTypeReplace = [
{ include:"vimeo.com",
replace:'https://vimeo.com/',
repWith:'https://player.vimeo.com/video/',
replace2:'',
repWith2:''},
{ include:"youtube.com",
replace:'watch?v=',
repWith:'embed/',
replace2:'&start',
repWith2:'?start'},
{ include:"youtu.be",
replace:'youtu.be',
repWith:'www.youtube.com/embed',
replace2:'t=',
repWith2:'start='},
{ include:"monash.au.panopto",
replace:'Viewer',
repWith:'Embed',
replace2:'',
repWith2:''},
{ include:"ted.com",
replace:'www.ted.com',
repWith:'embed.ted.com',
replace2:'',
repWith2:''}
]
for(var vidI=0;vidI<vidTypeReplace.length;vidI++){
item = vidTypeReplace[vidI]
if (vidString.includes(item.include)){
videoLink = vidString.replace(item.replace,item.repWith).replace(item.replace2,item.repWith2)
}
}
if (videoLink == null){
if (!(showingError)){
showErrorMsg('videoLinkError','Invalid url, please paste in a link to a panopto/youtube/TED/or Vimeo video',5000,function(){showingError=false})
showingError=true
}
}
else{
$('#respVidSwitch').val(videoLink);
}
return videoLink
}
/* Variable Key
These variables are pre-defined html that is added to inputs from users before and after to generate the final html product for copying and pasting.
respVid = responsive Video Right (context left/video right)
*/
/*These different options have been absorbed into a javascript Object allowing a direct mapping and lookup of code to icon name*/
</script>
<!--<script>
window.onload=function(){
$('#beestNav').load('common/beestnav.html');
$('#beestFooter').load('common/beestfooter.html');
function activeNav() {
var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/")+1);
$(".nav-link").each(function(){
if($(this).attr("href") == pgurl || $(this).attr("href") == '' ){
$(this).addClass("active");
$(this).removeClass("text-white");
$(this).append('<span class="sr-only">(current)</span>');
$(this).closest('.nav-item').css({"background": "#004DAE"});
}
});
}
setTimeout(function() {
activeNav();
}, 100);
};
</script>-->
<style>
/*
#preview {
position:static;
}
#preview.scrolling {
position:fixed;
top:50%;
right:0px;
}
*/
.mce-notification-inner, .mce-close, .mce-notification-warning {
display:none !important;
}
.tooltip-inner {
text-align: left;
padding: 15px;
font-size: 1.05rem;
max-width: 480px;
}
.nav-item:hover {
background: #004dae;
}
</style>
</head>
<body onload=generateCode()>
<div id="beestNav"></div>
<div class="py-5"></div>
<div class="container-fluid">
<h3 class="text-center font-weight-bold">Responsive video + context <span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="This page takes a video URL, text input and other choices and combines them to make a video that is responsive across device sizes. Resize your screen to see the effect on the Preview placeholder video. Once the screen is small enough the text/video will collapse under one another on small devices for optimal use." class="hideableinstruct text-success font-weight-normal small"> <i class="fa fa-question-circle"></i></span></h3>
<h5 class="text-center"><a class="hideableinstruct" data-toggle="modal" data-target=".respVidWalkthrough" href="">Create a responsive video walkthrough (5:55)</a></h5>
<!--Modal content for this page-->
<!--Responsive video walkthrough modal-->
<div class="modal fade respVidWalkthrough" tabindex="-1" role="dialog" aria-labelledby="panopto-modal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content p-2 bg-dark">
<div class="modal-header">
<h5 class="modal-title text-white" id="exampleModalLabel">Click close or click outside this box to return to the BEEST.</h5>
<button type="button" class="btn btn-outline-light btn-lg ml-2" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Close ×</span>
</button>
</div>
<div class="embed-responsive embed-responsive-16by9"><iframe class="embed-responsive-item" frameborder="0" allowfullscreen="allowfullscreen" src="https://monash-panopto.aarnet.edu.au/Panopto/Pages/Embed.aspx?id=cef099bc-a7e9-4211-be3c-ac3e005c0924"></iframe></div>
</div>
</div>
</div>
<!--How to paste HTML into Moodle modal-->
<div class="modal fade html-paste-modal" tabindex="-1" role="dialog" aria-labelledby="html-paste-modal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content p-2 bg-dark">
<div class="modal-header">
<h5 class="modal-title text-white" id="exampleModalLabel">Click close or click outside this box to return to the BEEST.</h5>
<button type="button" class="btn btn-outline-light btn-lg ml-2" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Close ×</span>
</button>
</div>
<div class="embed-responsive embed-responsive-16by9"><iframe class="embed-responsive-item" frameborder="0" allowfullscreen="allowfullscreen" src="https://monash-panopto.aarnet.edu.au/Panopto/Pages/Embed.aspx?id=d1c0ffaa-23a4-4d38-bb49-abda00b7805a"></iframe></div>
</div>
</div>
</div>
<!--End of modal content-->
<div class="row w-50 mx-auto text-center mt-3">
<div class="col-lg">
<a data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Click this button to clear the page and start again." href="javascript:window.location.reload()" class="btn btn-danger btn-lg btn-block" role="button">Clear the page <i class="fa fa-fw fa-refresh"></i></a>
</div>
<div class="col-lg">
<button data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Click this button to toggle the help instructions on the page on/off. Only do this if you are completely familiar with how to use the page" onclick="flipTooltip()" id="toggleHelp" class="btn btn-success btn-lg btn-block">Turn <span class="onoffswapinstr">off</span> help <i class="fa fa-fw fa-power-off"></i></a>
</div></div>
<hr class="hr2">
<form id="respVid">
<div class="row w-100 mx-auto">
<div class="col-lg-6">
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Recover<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Recover recently created items. This will only become operational once you have created at least one item. If you change browsers or clear your browser history, you will lose this history as well." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg-8">
<select class="custom-select border border-dark" size="1" id="recoveryDate" onchange="idSelectedRecData()">
<option selected value=0>please wait</option>
</select>
</div>
<div class="col-lg-1 text-center">
<button id="delHist" onclick="delHistI()" type="button" class="btn btn-danger mr-2" data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Delete the currently selected historical data."><i class="fa fa-fw fa-trash"></i></button>
<button id="loadHist" onclick="getHistoryI(histIndex,historicalData)" class="btn btn-mu d-none">Recover <i class="fa fa-fw fa-undo"></i></button>
</div>
</div>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Paste code from Moodle<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Paste in the code you previously generated from BEEST and pasted into Moodle to recover and redesign the element." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg">
<textarea class="rounded p-2 w-100 mt-2" rows="2" name="retrieveCode" type="text" id="retrieveCode" placeholder="Copy previously generated BEEST code from Moodle and paste it here" onchange=recoverCode()></textarea>
</div>
</div>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Video link<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Paste in the link/URL (not the embed code) for your video." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg">
<div class="hideableinstruct"><strong>Which video link do you need?</strong> Walkthroughs (30 secs approx.)</div>
<div> <a data-toggle="modal" data-target=".panopto-modal" href="">Panopto</a>
<!--Panopto link walkthrough modal-->
<div class="modal fade panopto-modal" tabindex="-1" role="dialog" aria-labelledby="panopto-modal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content p-2 bg-dark">
<div class="modal-header">
<h5 class="modal-title text-white" id="exampleModalLabel">Click close or click outside this box to return to the BEEST.</h5>
<button type="button" class="btn btn-outline-light btn-lg ml-2" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Close ×</span>
</button>
</div>
<div class="embed-responsive embed-responsive-16by9"><iframe class="embed-responsive-item" frameborder="0" allowfullscreen="allowfullscreen" src="https://monash-panopto.aarnet.edu.au/Panopto/Pages/Embed.aspx?id=b84fa926-7531-4321-8f0b-ac2c0000d69d"></iframe></div>
</div>
</div>
</div> | <a data-toggle="modal" data-target=".youtube-modal" href="">YouTube</a>
<!--YouTube link walkthrough modal-->
<div class="modal fade youtube-modal" tabindex="-1" role="dialog" aria-labelledby="youtube-modal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content p-2 bg-dark">
<div class="modal-header">
<h5 class="modal-title text-white" id="exampleModalLabel">Click close or click outside this box to return to the BEEST.</h5>
<button type="button" class="btn btn-outline-light btn-lg ml-2" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Close ×</span>
</button>
</div>
<div class="embed-responsive embed-responsive-16by9"><iframe class="embed-responsive-item" frameborder="0" allowfullscreen="allowfullscreen" src="https://monash-panopto.aarnet.edu.au/Panopto/Pages/Embed.aspx?id=98282461-8b14-48fb-a4d2-ac2c0000d672"></iframe></div>
</div>
</div>
</div> | <a data-toggle="modal" data-target=".ted-modal" href="">TED Talks</a>
<!--TED Talks link walkthrough modal-->
<div class="modal fade ted-modal" tabindex="-1" role="dialog" aria-labelledby="ted-modal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content p-2 bg-dark">
<div class="modal-header">
<h5 class="modal-title text-white" id="exampleModalLabel">Click close or click outside this box to return to the BEEST.</h5>
<button type="button" class="btn btn-outline-light btn-lg ml-2" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Close ×</span>
</button>
</div>
<div class="embed-responsive embed-responsive-16by9"><iframe class="embed-responsive-item" frameborder="0" allowfullscreen="allowfullscreen" src="https://monash-panopto.aarnet.edu.au/Panopto/Pages/Embed.aspx?id=d27cc54b-dd5e-4436-b862-ac2c0000d623"></iframe></div>
</div>
</div>
</div> | <a data-toggle="modal" data-target=".vimeo-modal" href="">Vimeo</a>
<!--Vimeo link walkthrough modal-->
<div class="modal fade vimeo-modal" tabindex="-1" role="dialog" aria-labelledby="vimeo-modal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content p-2 bg-dark">
<div class="modal-header">
<h5 class="modal-title text-white" id="exampleModalLabel">Click close or click outside this box to return to the BEEST.</h5>
<button type="button" class="btn btn-outline-light btn-lg ml-2" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Close ×</span>
</button>
</div>
<div class="embed-responsive embed-responsive-16by9"><iframe class="embed-responsive-item" frameborder="0" allowfullscreen="allowfullscreen" src="https://monash-panopto.aarnet.edu.au/Panopto/Pages/Embed.aspx?id=a55274ab-2219-40ec-8c85-ac2c0000d64d"></iframe></div> </div>
</div>
</div>
</div>
<textarea class="rounded p-2 w-100 mt-2" rows="1" name="respVidSwitch" type="text" id="respVidSwitch" placeholder="Paste the Youtube/Panopto/Vimeo/TED Talks video link here" onchange=generateCode()></textarea>
<span id="videoLinkError"></span>
</div>
</div>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Context<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="It's recommended to have a few sentences or dot points explaining what is in the video students are about to watch. This helps in particular when students are reviewing material for assessment." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg">
<textarea id="tinyMCEvideo" class="border border-dark rounded p-2 w-100" cols="70" rows="3" name="respVid_context" onchange=generateCode()></textarea>
</div>
</div>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Position <span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Choose which side of screen you would prefer the video to appear by clicking on one of the options below. Video on the right is selected by default." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg">
<!--<select class="custom-select w-100 border border-dark" id="videoPosition" name="videoPosition" size="1" onchange=generateCode()>
<option value="right" selected>Video on the right</option>
<option value="left">Video on the left</option>
</select>-->
<div class="form-check form-check-inline" id="videoPosition" onchange=generateCode()>
<input class="form-check-input" name="videoPosition" id="videoPosition1" type="radio" value="left">
<label class="form-check-label" for="videoPosition1">Left</label>
</div>
<div class="form-check form-check-inline" id="videoPosition" onchange=generateCode()>
<input class="form-check-input" name="videoPosition" id="videoPosition2" type="radio" value="right" checked>
<label class="form-check-label" for="videoPosition2">Right</label>
</div>
<div class="form-check form-check-inline" id="videoPosition" onchange=generateCode()>
<input class="form-check-input" name="videoPosition" id="videoPosition3" type="radio" value="up">
<label class="form-check-label" for="videoPosition3">Above</label>
</div>
<div class="form-check form-check-inline" id="videoPosition" onchange=generateCode()>
<input class="form-check-input" name="videoPosition" id="videoPosition4" type="radio" value="down">
<label class="form-check-label" for="videoPosition4">Below</label>
</div>
</div>
</div><span id='widthRow'>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Width <span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Choose whether you want the video to be 50% (1/2) of the screen width or 33.3% (1/3) of the screen width." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg">
<!--<select class="custom-select w-100 border border-dark" id="videoWidth" name="videoWidth" size="1" onchange=generateCode()>
<option value="50" selected>50% (1/2)</option>
<option value="33">33.3% (1/3)</option>
</select>-->
<div class="form-check form-check-inline" id="videoWidth" onchange=generateCode()>
<input class="form-check-input" name="videoWidth" id="videoWidth1" type="radio" value="50" checked>
<label class="form-check-label" for="videoWidth1">50% (1/2 of the screen width)</label>
</div>
<div class="form-check form-check-inline" id="videoWidth" onchange=generateCode()>
<input class="form-check-input" name="videoWidth" id="videoWidth2" type="radio" value="33">
<label class="form-check-label" for="videoWidth2">33.3% (1/3 of the screen width)</label>
</div>
</div>
</div></span>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Heading<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Type a heading for this video. 75 character maximum. This will site above the video and context. If you want an icon to display you must also type a heading." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg">
<textarea maxlength="75" class="rounded p-2 w-100" rows="1" name="respVid_heading" type="text" id="respVidHeading" placeholder="Type your video heading here" onchange=generateCode()></textarea>
</div>
</div>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Heading size<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Choose the size of your heading. Will default to small on entering a heading above" class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg my-auto">
<!--<select class="custom-select w-100 border border-dark" id="headSize" name="headSize" size="1" onchange=generateCode()>
<option selected value="h5">Small (heading 5)</option>
<option value="h4">Medium (heading 4)</option>
<option value="h3">Large (heading 3)</option>
</select>-->
<div class="form-check form-check-inline" id="headSize" onchange=generateCode()>
<input class="form-check-input" name="headSize" id="headSizeNone" type="radio" value="noH" checked>
<label class="form-check-label" for="headSizeNone">None</label>
</div>
<div class="form-check form-check-inline" id="headSize" onchange=generateCode()>
<input class="form-check-input" name="headSize" id="headSize1" type="radio" value="h5">
<label class="form-check-label" for="headSize1"><h5>Small</h5></label>
</div>
<div class="form-check form-check-inline" id="headSize" onchange=generateCode()>
<input class="form-check-input" name="headSize" id="headSize2" type="radio" value="h4">
<label class="form-check-label" for="headSize2"><h4>Medium</h4></label>
</div>
<div class="form-check form-check-inline" id="headSize" onchange=generateCode()>
<input class="form-check-input" name="headSize" id="headSize3" type="radio" value="h3">
<label class="form-check-label" for="headSize3"><h3>Large</h3></label>
</div>
</div>
</div>
<hr>
<div class="row w-100 mx-auto">
<div class="col-lg-3">
<h5 class="font-weight-bold">Heading icon<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Choose an icon to go with your heading. If you choose an icon without typing a heading, it will not display" class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
</div>
<div class="col-lg my-auto">
<!--<select class="custom-select w-100 border border-dark" id="faCode" name="faCode" size="1" onchange=generateCode()>
<option selected value="noI">No icon</option>
<option value="1">Video Camera</option>
<option value="2">Play</option>
<option value="3">Eye</option>
</select>-->
<div class="form-check form-check-inline" id="faCode" onchange=generateCode()>
<input class="form-check-input" name="faCode" id="faCodeNone" type="radio" value="noI" checked>
<label class="form-check-label" for="faCodeNone">None</label>
</div>
<div class="form-check form-check-inline" id="faCode" onchange=generateCode()>
<input class="form-check-input" name="faCode" id="faCode1" type="radio" value="1">
<label class="form-check-label" for="faCode1"><i class="fa fa-fw fa-video-camera fa-2x"></i></label>
</div>
<div class="form-check form-check-inline mx-1" id="faCode" onchange=generateCode()>
<input class="form-check-input" name="faCode" id="faCode2" type="radio" value="2">
<label class="form-check-label" for="faCode2"><i class="fa fa-fw fa-play fa-2x"></i></label>
</div>
<div class="form-check form-check-inline mx-1" id="faCode" onchange=generateCode()>
<input class="form-check-input" name="faCode" id="faCode3" type="radio" value="3">
<label class="form-check-label" for="faCode3"><i class="fa fa-fw fa-play-circle fa-2x"></i></label>
</div>
<div class="form-check form-check-inline mx-1" id="faCode" onchange=generateCode()>
<input class="form-check-input" name="faCode" id="faCode4" type="radio" value="4">
<label class="form-check-label" for="faCode4"><i class="fa fa-fw fa-play-circle-o fa-2x"></i></label>
</div>
<div class="form-check form-check-inline mx-1" id="faCode" onchange=generateCode()>
<input class="form-check-input" name="faCode" id="faCode5" type="radio" value="5">
<label class="form-check-label" for="faCode5"><i class="fa fa-fw fa-eye fa-2x"></i></label>
</div>
</div>
</div>
<hr>
</div>
<div class="col-lg-6">
<div class="sticky-top" style="top:100px;">
<div class="row w-100">
<div class="col-lg-2">
<h5 class="font-weight-bold">Preview</h5>
<div class="text-center mb-2 previewButton">
<button type="button" class="btn btn-outline-dark" style="padding: .5rem .7rem;" id="togglePreviewFS" data-toggle="tooltip" data-placement="top" data-trigger="hover focus" title="Click to expand the preview to fullscreen. Click again or press Escape to return here to the editing screen."><i class="fa fa-fw fa-expand"></i></button>
</div>
</div>
<div class="col-lg bg-white" id="previewFS">
<div id="demo"></div>
</div>
</div>
<hr>
<h5 class="font-weight-bold">Copy code<span data-toggle="tooltip" data-placement="bottom" data-trigger="hover focus" title="Click the copy code button below once you have finished building your video element, ready to paste into Moodle." class="hideableinstruct text-success small"> <i class="fa fa-question-circle"></i></span></h5>
<textarea readonly class="rounded p-2 w-100 mt-2" id="txtarearespVid" cols="70" rows="6" name="Result" placeholder="Code for your element will appear here"></textarea>
<input data-toggle="tooltip" data-placement="bottom" data-trigger="click" title="Your code has been copied" type="button" class="btn btn-success btn-block btn-lg my-2" id="copyCodeBtn" name="GenerateWrap" id="copyCodeBtn" value="Copy your code </>" onClick=copyCode() >
<div class="text-center mt-4 h5"><a data-toggle="modal" data-target=".html-paste-modal" href="">How do I paste this into Moodle</a>
</div>
</div>
<!--<input type="button" class="btn btn-arts m-1" name="GenerateWrap" value="Display in Moodle" onClick=writeinMoodle() ></p>-->
</div>
</div>
</div>
</form>
<p class="my-3"></p>
</div>
<div id="beestFooter"></div>
</body>
</html>