forked from SxtBox/RSS_Podcasts_Player
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clappr_player.php
77 lines (74 loc) · 1.54 KB
/
clappr_player.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
<?php
if (!ini_get('date.timezone')) {
date_default_timezone_set('Europe/Tirane');
}
// Function by [email protected]
function clappr_player($url){
$stream_url = @$_GET['url'];
if(!$stream_url)
$stream_url = "";
$stream_url = str_replace(
// REPLACE FROM
array(" "),
// REPLACE TO
array("%20"),
$stream_url
);
$width = '100%';
$height = '100%';
{
$player_code = '<html>
<!----/>
Player Code Generated From https://demo.kodi.al/My_Tools/Players_Tools/Player_Builder/Clappr_Player/
<!---->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>RSS Player</title>
<link rel="shortcut icon" href="https://kodi.al/panel.ico"/>
<link rel="icon" href="https://kodi.al/panel.ico"/>
<script src="https://cdn.jsdelivr.net/clappr/latest/clappr.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>
</head>
<body>
<div id="player"></div>
<script>
var player = new Clappr.Player({
source: "'.$stream_url.'",
mimeType: \'audio/mpeg\',
poster: "https://png.kodi.al/tv/albdroid/logo_bar.png",
watermark: "https://png.kodi.al/tv/albdroid/logo_bar.png",
position: "top-right",
parentId: "#player",
playInline: true,
autoPlay: false,
mediacontrol: {seekbar: "#0F0", buttons: "#0F0"},
width: "'.$width.'",
height: "'.$height.'"
});
</script>
</body>
</html>';
}
return $player_code;
}
echo clappr_player("");
?>