-
Notifications
You must be signed in to change notification settings - Fork 0
/
Clappr_Player.php
77 lines (74 loc) · 3.59 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
/*
┌─────────────────────────────────────────────────────────────┐
| For More Modules Or Updates Stay Connected to Kodi dot AL |
└─────────────────────────────────────────────────────────────┘
┌───────────┬─────────────────────────────────────────────────┐
│ Product │ ipcamlive.com Stream Extractor By Alias [ID] │
│ Version │ v1.0-FREE │
│ Provider │ https://www.ipcamlive.com/ │
│ Support │ Clappr Player by ID │
│ Licence │ MIT │
│ Author │ Olsion Bakiaj │
│ Email │ TRC4@USA.COM │
│ Author │ Endrit Pano │
│ Email │ INFO@ALBDROID.AL │
│ Website │ https://kodi.al │
│ Facebook │ /albdroid.official/ │
│ Github │ github.com/SxtBox/ │
│ Created │ 16 November 2020 │
└─────────────────────────────────────────────────────────────┘
*/
/*
TO GET STREAM REQUIRED ONLY THE Alias ID => ?id=+alias
DIRECT LINK http://ipcamlive.com/player/player.php?alias=599eeee0b0b89
DIFFERENT PLAYER HOST g1 g2 g3 ETC
http://g1.ipcamlive.com/player/player.php?alias=5aea0a2674e5d
http://g1.ipcamlive.com/player/player.php?alias=5aea0854caea0
*/
error_reporting(0);
date_default_timezone_set("Europe/Tirane");
$alias = isset($_GET['id']) && !empty($_GET['id']) ? $_GET['id'] : "599eeee0b0b89"; // << alias
$source = file_get_contents(trim('https://ipcamlive.com/player/player.php?alias='.$alias));
if(preg_match("/var address = '(.*?)'/",$source,$match))
{
$stream = $match[1];
$stream = str_replace('http','https',$stream);
}
if(preg_match("/var streamid = '(.*?)'/",$source,$streamid_match))
{
$streamid = $streamid_match[1];
$streamid = str_replace('','',$streamid);
}
$stream_url = $stream."streams/".$streamid."/stream.m3u8";
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Albdroid Webcam Streaming</title>
<link rel="shortcut icon" href="https://www.ipcamlive.com/tpls2/img/ipcamlive_favicon_128.png"/>
<link rel="icon" href="https://www.ipcamlive.com/tpls2/img/ipcamlive_favicon_128.png"/>
<script src="https://cdn.jsdelivr.net/clappr/latest/clappr.min.js"></script>
</head>
<style type="text/css">
body,td,th {
color: #0F0;
}
body {
background-color: #000;
}
</style>
<body>
<div id="player" style="width:100%; height:100%">
</div>
<script>
var player = new Clappr.Player({
source: "<?php echo ($stream_url) ?>",
parentId: "#player",
width:'100%',
height:'100%',
autoPlay: false,
});
</script>
</body>
</html>