-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview.php
98 lines (85 loc) · 2.86 KB
/
view.php
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
<?php
include('meta.php');
$file = $_GET["file"];
$fileDir = "upload/".$file."";
$ext = pathinfo($fileDir, PATHINFO_EXTENSION);
$fileName = $file;
$stripped = str_replace(' ', '%20', $file);
$thumb_name = "https://video.quirky.codes/thumb/".$stripped.".png";
$video_file = "https://video.quirky.codes/upload/".$stripped."";
meta($fileName,$thumb_name,$video_file);
echo'<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.plyr.io/2.0.15/plyr.css">
<script src="https://cdn.plyr.io/2.0.15/plyr.js"></script>
<title>'.$file.'</title>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.5.1/dropzone.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.5.1/dropzone.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
</head>
<body>
<h1 class="font">'.$file.'</h1>
<div class="video-size">
<video id="plyr-video" controls>
<source src="upload/'.$file.'" type="video/mp4">
</video>
</div>
<h3 class="font">Your other videos</h3>
<div class="preview" id="preview"></div>
<script>
plyr.setup("#plyr-video");
</script>
</body>
</html>
<script>
$(document).ready(function(){
Dropzone.options.dropzoneFrom = {
autoProcessQueue: true,
timeout: 300000,
acceptedFiles:".png,.jpg,.gif,.bmp,.jpeg, .mp4",
init: function(){
var submitButton = document.querySelector("#submit-all");
myDropzone = this;
submitButton.addEventListener("click", function(){
myDropzone.processQueue();
});
this.on("complete", function(){
if(this.getQueuedFiles().length == 0 && this.getUploadingFiles().length == 0)
{
var _this = this;
_this.removeAllFiles();
}
list_image();
});
},
};
list_image();
function list_image()
{
$.ajax({
url:"otherVideo.php",
success:function(data){
$("#preview").html(data);
}
});
}
$(document).on("click", ".remove_image", function(){
var name = $(this).attr("id");
$.ajax({
url:"upload.php",
method:"POST",
data:{name:name},
success:function(data)
{
list_image();
}
})
});
});
</script>
';
?>