-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
124 lines (99 loc) · 4.48 KB
/
index.html
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE html>
<html>
<head>
<title>flv + vast testcase</title>
<meta charset="utf-8">
<!-- VideoJs required styles-->
<link rel="stylesheet" type="text/css" href="http://mailonline.github.io/videojs-vast-vpaid/demo/videojs_5/video-js.css"/>
<!-- VideoJs.vast.vpaid required styles-->
<link rel="stylesheet" type="text/css" href="http://mailonline.github.io/videojs-vast-vpaid/styles/videojs.vast.vpaid.css"/>
<script type="text/javascript">
// this is mandatory for IE8 !!!!!
document.createElement('video');
document.createElement('audio');
document.createElement('track');
</script>
<!-- VideoJs required scripts-->
<script type="text/javascript" src="http://mailonline.github.io/videojs-vast-vpaid/demo/videojs_5/video.js"></script>
<!-- VideoJs.vast.vpaid required scripts-->
<script type="text/javascript" src="http://mailonline.github.io/videojs-vast-vpaid/scripts/es5-shim.js"></script>
<script type="text/javascript" src="http://mailonline.github.io/videojs-vast-vpaid/scripts/ie8fix.js"></script>
<script type="text/javascript" src="http://mailonline.github.io/videojs-vast-vpaid/scripts/videojs_5.vast.vpaid.js"></script>
<style type="text/css">
html, body { height: 100%; margin: 0px; background-color:transparent}
</style>
</head>
<body>
<style type="text/css">
.vjs-default-skin {
display: inline-block;
width: 100%;
height: 100%;
text-align: center;
vertical-align: middle;
background-color:#333333
}
video {margin:auto; background-color:transparent; }
</style>
<div style="width:500px; height: 320px">
<video id="vid_1" class="video-js vjs-default-skin"
controls
preload="auto"
poster="http://www.video.banzaj.pl/thumb/27734.jpg"
width="100%"
height="100%">
<source src="http://www.video.banzaj.pl/flvideo/12214787131510034026.flv" type="video/x-flv">
<p>Video Playback Not Supported</p>
</video>
<video id="vid_2" class="video-js vjs-default-skin"
controls
autoplay
preload="auto"
poster="http://www.video.banzaj.pl/thumb/27734.jpg"
width="100%"
height="100%">
<source src="http://www.video.banzaj.pl/flvideo/12214787131510034026.flv" type="video/x-flv">
<p>Video Playback Not Supported</p>
</video>
</div>
<script type="text/javascript">
// videojs.options.flash.swf = "http://www.video.banzaj.pl/js/video-js/video-js.swf";
videojs.plugin('ads-setup', function (opts) {
var player = this;
var vastAd = player.vastClient({
/* vpaidFlashLoaderPath: 'http://www.video.banzaj.pl/js/videojs-vast-vpaid/VPAIDFlash.swf',*/
adTagUrl: getAdsUrl,
playAdAlways: opts.playAdAlways || true,
adCancelTimeout: opts.adsCancelTimeout || 5000,
adsEnabled: !!opts.adsEnabled
});
player.on('vast.reset', function () {
if (!!opts.adsEnabled) {
vastAd.enable();
} else {
vastAd.disable();
}
});
function getAdsUrl() {
return 'http://servedby.flashtalking.com/imp/1/31714;812030;208;xml;DailyMail;640x360VASTHTML5/?cachebuster=%%CACHEBUSTER%%';
}
});
videojs('vid_1',
{
'plugins': {
'ads-setup': {
'adsEnabled': true
}
}
});
videojs('vid_2',
{
'plugins': {
'ads-setup': {
'adsEnabled': true
}
}
});
</script>
</body>
</html>