2019-01-13 18:02:16 +00:00
|
|
|
<?php
|
|
|
|
$config = parse_ini_file('../config/config.ini',true);
|
|
|
|
if(!isset($_COOKIE["session"]) || $_COOKIE["session"] != "true" || !$config["Media"]["vimeo"]) {
|
|
|
|
http_response_code(403);
|
|
|
|
die('Forbidden');
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en" style="height:100%">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<script src="/assets/js/player/youplay.js"></script>
|
|
|
|
</head>
|
|
|
|
<body style="margin:0;height:100%;overflow:hidden">
|
|
|
|
<?php
|
|
|
|
include("vimeoclass.php");
|
|
|
|
$vdata = vimeo(htmlspecialchars($_GET["id"]));
|
|
|
|
if($vdata) {
|
|
|
|
$vlink = $vdata["dl"];
|
|
|
|
?>
|
2020-02-09 18:26:29 +00:00
|
|
|
<video class="video-js vjs-default-skin" controls id="player" poster="image.php?url=<?=urlencode($vdata["info"]["Thumbnail"])?>" title="<?=htmlspecialchars($vdata["info"]["Title"])?>" style="width:100%;height:100%">
|
2019-03-08 19:00:32 +00:00
|
|
|
<?php
|
|
|
|
for($i=0;$i<count($vdata["info"]["Captions"]);$i++) {
|
|
|
|
echo "<track kind='captions' label='".$vdata["info"]["Captions"][$i]["title"]."' src='vimeocaption.php?url=".urlencode($vdata["info"]["Captions"][$i]["url"])."'>";
|
|
|
|
}
|
|
|
|
?>
|
2019-01-13 18:02:16 +00:00
|
|
|
Your browser does not support the video tag.
|
|
|
|
</video>
|
|
|
|
<script>
|
|
|
|
yp_player({share:false,use_desktop_skin:true,sources:[
|
|
|
|
<?php
|
|
|
|
for($i=0;$i<count($vlink);$i++) {
|
|
|
|
echo "{src:'".$vlink[$i]["url"]."',label:'".$vlink[$i]["type"]."',audio:true},";
|
|
|
|
}
|
|
|
|
?>
|
2019-03-08 19:00:32 +00:00
|
|
|
],thumbnails:JSON.parse('<?=json_encode($vdata["info"]["Thumbs"])?>')});
|
2019-01-13 18:02:16 +00:00
|
|
|
</script>
|
|
|
|
<?php } else { ?>
|
|
|
|
Sorry, there was an error while trying to load your video.
|
|
|
|
<?php } ?>
|
|
|
|
</body>
|
2019-03-08 19:00:32 +00:00
|
|
|
</html>
|