@ -51,7 +51,7 @@ define('PROJECT_ROOT', getcwd());
< a class = "button folderName" id = "backButton" href = "" > < i class = "fa fa-arrow-left" aria-hidden = "true" > < / i > Go Back< / a >
< a class = "button folderName" id = "backButton" href = "" > < i class = "fa fa-arrow-left" aria-hidden = "true" > < / i > Go Back< / a >
< a class = "button" href = "./" > < i class = "fa fa-home" aria-hidden = "true" > < / i > Home< / a >
< a class = "button" href = "./" > < i class = "fa fa-home" aria-hidden = "true" > < / i > Home< / a >
< div class = " netcloud -logo"> < / div >
< div class = " mit -logo"> < / div >
< div class = "loader" > Loading...< / div >
< div class = "loader" > Loading...< / div >
< ul class = "data" > < / ul >
< ul class = "data" > < / ul >
@ -64,7 +64,7 @@ define('PROJECT_ROOT', getcwd());
<!-- Include our script files -->
<!-- Include our script files -->
< script src = "https://code.jquery.com/jquery-3.5.1.js" > < / script >
< script src = "https://code.jquery.com/jquery-3.5.1.js" > < / script >
< script src = "assets/js/script .js?random=<?php echo uniqid (); ?> " ></ script >
< script src = "assets/js/script 2 .js?random=<?php echo uniqid (); ?> " ></ script >
<!-- FancyBox -->
<!-- FancyBox -->
< script src = "https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js" > < / script >
< script src = "https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js" > < / script >
< script type = "text/javascript" >
< script type = "text/javascript" >
@ -88,66 +88,23 @@ define('PROJECT_ROOT', getcwd());
document.cookie = cname + "=" + cvalue + "; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/";
document.cookie = cname + "=" + cvalue + "; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/";
}
}
// initialize array only if emty
var json_str = getCookie("watchedVideoArray");
var json_str = getCookie("watchedVideoArray");
// initialize array only if emty
if (json_str == "") {
if (json_str == "") {
// If never used this page create an initial array
// If never used this page create an initial array
var arr_watchstatus = [
var arr_watchstatus = [
"netcloud -init"
"michu-it -init"
];
];
} else {
} else {
// Decode allready watched elements from cookie
// Decode allready watched elements from cookie
var arr_watchstatus = JSON.parse(json_str);
var arr_watchstatus = JSON.parse(json_str);
}
}
// initiate video container
// Overrrides Default for HTML5 video
$.fancybox.defaults.video.tpl = '< video class = "fancybox-video" controls controlsList = "nodownload" poster = "{{poster}}" > ' +
$.fancybox.defaults.video.tpl = '< video class = "fancybox-video" controls controlsList = "nodownload" poster = "{{poster}}" > ' +
'< source src = "{{src}}" type = "{{format}}" / > ' +
'< source src = "{{src}}" type = "{{format}}" / > ' +
'Sorry, your browser doesn\'t support embedded videos, < a href = "{{src}}" > download< / a > and watch with your favorite video player!!' +
'Sorry, your browser doesn\'t support embedded videos, < a href = "{{src}}" > download< / a > and watch with your favorite video player!' +
"< / video > < div class = 'speedControl' > < div class = 'indicator' > 1x< / div > < / div > ";
"< / video > ";
$(document).on('afterClose.fb', function(e, instance, slide) {
console.info(slide.opts.$orig);
//console.info( slide.opts.$orig[0].dataset.src ); //Gets Video Path from clicked link
// append new value to the array
arr_watchstatus.push(slide.opts.$orig[0].dataset.src); // adds new video path to array!
var json_str = JSON.stringify(arr_watchstatus); // JSON encodes the array
setCookie('watchedVideoArray', json_str); // Set new JSON Value to cookie
//parent.location.reload(true);
slide.opts.$orig[0].childNodes[5].style.display = "inline"; // After closing set green thick!
});
// setup video play speed functions on modal open:
$(document).on('afterLoad.fb', function( e, instance, slide ) {
//console.info( "Works" );
const video = document.querySelector('video');
const speedControl = document.querySelector('.speedControl');
const indicator = document.querySelector('.indicator');
let mousedown = false;
speedControl.addEventListener('mousedown', () => mousedown = true);
speedControl.addEventListener('mouseup', () => mousedown = false);
speedControl.addEventListener('mouseleave', () => mousedown = false);
speedControl.addEventListener('mousemove', function(e) {
if (!mousedown) return;
const min = 0.5;
const max = 2;
const position = e.pageY - this.offsetTop;
const percent = position / this.offsetHeight;
const height = Math.floor(percent * 1000) / 10 + '%';
const playbackRate = percent * (max - min) + min;
if (playbackRate < 0.5 ) playbackRate = 0.5;
indicator.style.height = height;
indicator.innerText = playbackRate.toFixed(1) + 'x';
video.playbackRate = playbackRate;
});
});
< / script >
< / script >
< / body >
< / body >