-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·95 lines (85 loc) · 1.91 KB
/
index.php
File metadata and controls
executable file
·95 lines (85 loc) · 1.91 KB
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
<?php
$play = false;
$query = "";
if (isset($_POST["query"])) {
$play = true;
$query = $_POST["query"];
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="/style.css">
<title>ARFNET</title>
<style>
.title {
font-size: 36px;
}
header *{
display: inline-block;
}
*{
vertical-align: middle;
max-width: 100%;
}
video {
width: 72%;
}
.form {
margin: auto;
text-align: center;
margin-bottom: 50px;
border-style: double;
padding: 20px;
}
.searchbox {
width: 50%;
}
.searchbar {
//height: 25px;
width: 80%;
}
.result {
font-size: 20px;
margin-bottom: 20px;
margin-left: 15px;
}
.stats {
font-size: 20px;
margin-bottom: 20px;
margin-left: 15px;
}
</style>
</head>
<body>
<header>
<img src="/arfnet_logo.png" width="64">
<span class="title"><strong>ARFNET</strong></span>
</header>
<hr>
<a class="home" href="/">Home</a><br>
<h2>ARFNET Player</h2>
<p>HTML5 supports MPEG-4 and MKV containers, with H.264 AVC video and AAC audio only, no AC3.<br>
It is strongly encouraged to use VLC instead to stream media</p>
<br>
<?php
if ($play) {
echo '<video id="player" class="video-js vjs-default-skin" height="720" width="1280" controls preload="none" autoplay>'.
'<source src="'.$query.'"/>'.
'</video>'.
'<script>'.
'var player = videojs("#player");'.
'</script>';
} else {
echo '<div class="searchbox form">'.
'<form action="/player.php" method="POST">'.
'<label>url</label>'.
'<input class="searchbar" type="text" name="query">'.
'<input class="" type="submit" value="Play">'.
'</form>'.
'</div>';
}
?>
</body>
</html>