forked from ArdiArtani/Google-Drive-Player-Script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
embed.php
37 lines (33 loc) · 901 Bytes
/
embed.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
<?php
error_reporting(0);
include "curl_gd.php";
if($_GET['url'] != ""){
$gid = $_GET['url'];
$original_id = my_simple_crypt($gid, 'd');
$title = fetch_value(file_get_contents_curl('https://drive.google.com/get_video_info?docid='.$original_id), "title=", "&");
$url = 'https://drive.google.com/file/d/'.$original_id.'/view';
$linkdown = Drive($url);
$file = '[{"type": "video/mp4", "label": "HD", "file": "'.$linkdown.'"}]';
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title><?php echo $title?> - Google Drive</title>
</head>
<body>
<div id="myElement"></div>
<script src="https://content.jwplatform.com/libraries/DbXZPMBQ.js"></script>
<script type="text/javascript">
jwplayer("myElement").setup({
playlist: [{
"sources":<?php echo $file?>
}],
allowfullscreen: true,
width: '100%',
aspectratio: '16:9',
});
</script>
</body>
</html>