-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTVC.php
More file actions
65 lines (59 loc) · 1.81 KB
/
TVC.php
File metadata and controls
65 lines (59 loc) · 1.81 KB
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
<script src="https://ssl.p.jwpcdn.com/player/v/8.21.1/jwplayer.js?ver=5.9.3"></script>
<body>
<style type="text/css">*{margin:0;padding:0;outline:none;}#player{position:absolute;width:100%!important;height:100%!important;}*:focus{outline:none;}
</style>
<div id="player"></div>
<script>
var arrPreroll = ["/vast/0.php"];
console.log(arrPreroll);
var player = jwplayer('player');
player.setup({
primary: "html5",
key: "F4+phNkFZ4+I3UhfSN6h8JPbxdnsto3caVMq+A==",
sources: [{"file":"/vast/0.mp4","label":"1080p","type":"video/mp4"}],
image: "https://lh3.googleusercontent.com/-gUfxDqPDO70/YoxSqln2-JI/AAAAAAAAASI/GWtnHRCPOPAOvFYSICOG0HSRIzdD02VcACNcBGAsYHQ/s0/i.jpg",
skin: {
name: "tube",
active: "red",
},
width: "100%",
height: "100%",
aspectratio: "16:9",
playbackRateControls : true,
autostart: true,
mute: false,
cast: {},
advertising: {
tag: arrPreroll,
client: "vast",
vpaidmode: "insecure",
preloadAds: "1",
skipoffset: "5",
skipmessage: "Tắt QC Sau xx Giây",
skiptext: "Tắt Quảng Cáo"
},
});
player.on('error', function() {
<?php echo 'location.href="'.$_GET['link'].'";'; ?>
});
player.on('play', function() {
<?php echo 'location.href="'.$_GET['link'].'";'; ?>
});
player.on('pause', function() {
<?php echo 'location.href="'.$_GET['link'].'";'; ?>
});
player.on('complete', function() {
<?php echo 'location.href="'.$_GET['link'].'";'; ?>
});
player.on('adPause', function() {
<?php echo 'location.href="'.$_GET['link'].'";'; ?>
});
player.on('adSkipped', function() {
<?php echo 'location.href="'.$_GET['link'].'";'; ?>
});
player.on('adComplete', function() {
<?php echo 'location.href="'.$_GET['link'].'";'; ?>
});
</script>
</body>
</html>