-
Notifications
You must be signed in to change notification settings - Fork 19
/
embed.php
64 lines (61 loc) · 1.36 KB
/
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
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
<?php
$apikey = "AIzaSyAHIDPKFSVbDwk-NdlAW8n3uh2q6AJkyAA";
if (isset($_GET['id'])) {
$id = $_GET['id'];
} else {
header('location:index.php') ;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Drive Video</title>
</head>
<body>
<script src="https://cdn.fluidplayer.com/v3/current/fluidplayer.min.js"></script>
<div class="video">
<video id="video-id" width="100%">
<source src="https://www.googleapis.com/drive/v3/files/<?php echo $id ; ?>?alt=media&key=<?php echo $apikey ; ?>" type="video/mp4" >
</video>
</div>
<script>
var myFP = fluidPlayer(
'video-id', {
"layoutControls": {
"controlBar": {
"autoHideTimeout": 3,
"animated": true,
"autoHide": true
},
"htmlOnPauseBlock": {
"html": null,
"height": null,
"width": null
},
"autoPlay": true,
"mute": true,
"allowTheatre": true,
"playPauseAnimation": true,
"playbackRateEnabled": true,
"allowDownload": true,
"playButtonShowing": true,
"fillToContainer": false,
"posterImage": ""
},
"vastOptions": {
"adList": [],
"adCTAText": false,
"adCTATextPosition": ""
}
})
</script>
<style>
* , body , .video , video {
padding : 0px ;
margin : 0px ;
}
</style>
</body>
</html>