-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathClappr_Player_By_ID.php
More file actions
182 lines (164 loc) · 4.79 KB
/
Clappr_Player_By_ID.php
File metadata and controls
182 lines (164 loc) · 4.79 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
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
<?php
/*
Mixed Playlist Generators by Folder
Filename: Clappr_Player_By_ID.php
Required JSON_API.php
GET: Clappr_Player_By_ID.php?id=1 2 3 etc see ids from JSON_API
Description: Clappr Player Structure
Author: TRC4@USA.COM
Created Date: 09 April 2025
*/
error_reporting(0);
set_time_limit(0);
date_default_timezone_set("Europe/Tirane");
function get_data ($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off') {
$protocol = 'http://';
} else {
$protocol = 'https://';
}
$ROOT_URL = $protocol . $_SERVER['SERVER_NAME'] . dirname($_SERVER['PHP_SELF']) . "/";
$PHP_PATH = $protocol . ($_SERVER['SERVER_NAME']) . ($_SERVER['PHP_SELF']) . "";
$json_api_path = $protocol . $_SERVER['SERVER_NAME'] . dirname($_SERVER['PHP_SELF']) . "/JSON_API.php";
$get_id = isset($_GET["id"]) && !empty($_GET["id"]) ? $_GET["id"] : "1";
$json = json_decode(get_data($json_api_path));
foreach($json as $item) {
if ($item->{"id"}==($get_id)) {
$title = $item->title;
$url = $item->file;
$description = $item->description;
$thumbnail = $item->image;
$type = $item->type;
$label = $item->label;
$date = $item->date;
$time = $item->time;
}
}
{
?>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><?php echo trim($title); ?></title>
<link rel="shortcut icon" href="https://kodi.al/favicon.ico"/>
<link rel="icon" href="https://kodi.al/favicon.ico"/>
<meta name="description" content="<?php echo trim($title); ?>">
<meta property="og:site_name" content="Clappr Player <?php echo trim($title); ?>">
<meta name="keywords" content="Albdroid TV">
<meta name="author" content="Olsion Bakiaj - Endrit Pano">
<meta http-equiv="cache-control" content="no-store">
<meta name="robots" content="noindex">
<meta name="googlebot" content="noindex" />
<meta name="referrer" content="no-referrer" />
<meta name="theme-color" content="#0F0">
<meta name="color-scheme" content="dark">
<meta name="msapplication-TileColor" content="#0F0">
<meta name="msapplication-navbutton-color" content="#0F0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<style type="text/css">
body,td,th {
color: #0F0;
}
body {
background-color: #000;
}
a:link {
color: #0FC;
}
a:visited {
color: #3F6;
}
a:hover {
color: #09F;
}
a:active {
color: #009;
}
</style>
<style>
.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] {
height: 3px
}
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator] svg {
opacity: 0
}
.media-control[data-media-control] {
display: block !important
}
.media-control[data-media-control] .media-control-background[data-background]::before {
font-size: 2vw;
color: #0F0;
text-align: center;
font-family: Segoe UI;
font-weight: bold;
/* content: "<?php echo trim($title); ?>"; */
text-shadow: 1px 1px 1px #0F0;
background-color: transparent;
margin-left:0px;
margin-top:0px;
opacity: 1.00;
position:absolute;
z-index:10000;
}
.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator] {
background: url(https://png.kodi.al/tv/albdroid/logo_bar.png) center center/100% no-repeat;
width: 100px;
display: block !important;
}
.image-container {
opacity: .8;
transition: all .3s;
display: block;
overflow: hidden;
background-color: rgba(255, 255, 255, .11)
}
</style>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@clappr/player@latest/dist/clappr.min.js"></script>
</head>
<?php
$clappr_player = '
<body>
<div onClick="nextItem();" id="divOver" style="background-color: transparent; margin-left:0px; margin-top:0px; opacity: 1.00; position:absolute; z-index:10000;">
<!---->
<span style="font-size: 15px; color:lime;"><b>'. $title .'</b></span>
</div>
<!---->
<div id="player" title="'. $title .'"></div>
<script>
var player = new Clappr.Player({
source: "'. $url .'",
poster: "'. $thumbnail .'",
watermark: "'. $thumbnail .'",
position: "top-right",
//scale: "exactfit",
parentId: "#player",
playInline: true,
autoPlay: false,
hlsLogEnabled: false,
disableErrorScreen: true,
mimeType: "'.$type.'",
mediacontrol: {
seekbar: "#0F0",
buttons: "#0F0"
},
width: \'100%\',
height: \'100%\'
});
</script>
</body>
</html>';
echo $clappr_player;
}
?>